[Asterisk-code-review] func_odbc: acf_odbc_read() and cli_odbc_read() unicode support (...asterisk[master])

Alexei Gradinari asteriskteam at digium.com
Wed Aug 28 09:53:22 CDT 2019


Alexei Gradinari has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/12812 )

Change subject: func_odbc:  acf_odbc_read() and cli_odbc_read() unicode support
......................................................................


Patch Set 3: Code-Review-1

(1 comment)

https://gerrit.asterisk.org/#/c/12812/3/funcs/func_odbc.c 
File funcs/func_odbc.c:

https://gerrit.asterisk.org/#/c/12812/3/funcs/func_odbc.c@932 
PS3, Line 932: 			if (coltype == SQL_WCHAR || coltype == SQL_WVARCHAR || coltype == SQL_WLONGVARCHAR) {
             : 					maxcol = maxcol * 2;
             : 				}
Need to call SQLColAttribute with SQL_DESC_DISPLAY_SIZE, which is the maximum number of bytes needed to display the data.

SQLLEN displaysize;

res = SQLColAttribute(stmt, x + 1, SQL_DESC_DISPLAY_SIZE, NULL, 0, NULL, &displaysize);
if (res != SQL_SUCCESS) {
... error
}
maxcol = displaysize;



-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/12812
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: I50e86c8a277996f13d4a4b9b318ece0d60b279bf
Gerrit-Change-Number: 12812
Gerrit-PatchSet: 3
Gerrit-Owner: Boris P. Korzun <drtr0jan at yandex.ru>
Gerrit-Reviewer: Alexei Gradinari <alex2grad at gmail.com>
Gerrit-Reviewer: Boris P. Korzun <drtr0jan at yandex.ru>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Comment-Date: Wed, 28 Aug 2019 14:53:22 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190828/a9eeb4ea/attachment.html>


More information about the asterisk-code-review mailing list