Closed knight-ni closed 3 years ago
have beed fixed by assign msgptr to SQLGetDiagRec like this
ret := api.SQLGetDiagRec(ht, h, api.SQLSMALLINT(i),
(*api.SQLCHAR)(unsafe.Pointer(&state[0])), &ne,
(*api.SQLCHAR)(unsafe.Pointer(&msg[0])),
api.SQLSMALLINT(len(msg)), &SQLmsglen)
@knight-ni I am glad you fixed your problem. I still do not know what your problem is, but should we change some code here for future users?
Alex
My odbc.ini
isql works fine with LANG set to zh_CN.utf8
but got messy codes as followed with programe
and it works fine with en_US.utf8
I also tried to reinstall unixODBC with --enable-iconv=yes --with-iconv-char-enc=UTF8 --with-iconv-ucode-enc=UTF16LE but not work actually i found Message in struct DiagRecord which generated by api.SQLGetDiagRec seems already wrong as chinese utf16 code, what can i do to fix this?
BTW i tried branch for_issue_88 but will truncate error message
{42S02} [GBasedbt][GBasedbt ODBC Driver][GBasedbt]指定的表 "asdfdual" ]
it should be looks like this in isql[S0002][GBasedbt][GBasedbt ODBC Driver][GBasedbt]指定的表 "asdfdual" 不在数据库中。