I just pass on version 6.1 SP1 of TD with Oracle 10G database.(I was using version 4.2.)
The data are in Chinese (16bits encoding for these characters).
With TD 4.2, I had no problems, but TD 6.1 can neither read nor write correctly the information ... It seems the problem come from the oracle dll drivers.
Enclosed this post, the setting of my database and an example of the data reported by TD and what should be reported.
Write yourself a small test case to fetch this CLT data and test by calling TD functionSalStrToWideChar(), which converts an ANSI string to Unicode. See TD help for details, but something like:
! assume sINPUT_ANSIString is an INTO var. in your SELECT query...
Call SalStrToWideChar( sINPUT_ANSIString, sOUTPUT_UnicodeString, ENC_UTF8 )
! now sOUTPUT_UnicodeString should be Unicode, so you could put that in a msg. box, assign to your "NOM" TW column for that row, etc.
I'D RECOMMEND you keep it very simple at first:
* fetch CLT into sINPUT_ANSIString
* call the WideChar function
* display sOUTPUT_UnicodeString in a SalMessageBox
We have already tried to convert the received characters, without success ...
Here after is our code, for each message called in TD I join the result:
Set sMSG = "no connexion"
If NOT SqlConnect ( hSql )
Call SqlPrepareAndExecute( hSql, " SELECT NOM FROM CLT
WHERE IDTCLT = '1289'
INTO :sNOM ")
Call SqlFetchNext( hSql, nInd )
Set sMSG = sNOM
Call SalMessageBox ( sMSG , "Fetch" , 16 )
Without conversion: Call SalStrToMultiByte( sNOM, sMSG, ENC_UTF8 )
Call SalMessageBox ( sMSG , "SalStrToMultiByte" , 16 )
a result, but not the good one... Call SalStrToWideChar( sNOM, sMSG, ENC_UTF8)
Call SalMessageBox ( sMSG , "SalStrToWideChar " , 16 )
no data after conversion: Best regards
Indeed, for Chinese characters, WE8ISO8851P1 character set is incorrect! We therefore migrate WE8ISO8859P1 character set to ZHS16GBK.
The probleme is solve.
Who is online
Users browsing this forum: [Ccbot] and 0 guests