If I run the following statements connected with an Oracle-DB with encoding WE8MSWIN1252 (native router), String sSymbol1 is not set.
NLS_LANG encoding on the client set to AL32UTF8.
Set sEuro = '€'
Set bRet = SqlPrepareAndExecute(hSql, 'Select :sEuro, unistr(\'\\20ac\'), \'€\', ascii(\'€\') from dual into :sSymbol1, :sSymbol2, :sSymbol3, :sAscii')
Set bRet = SqlFetchNext(hSql, nRetVal)
If the DB-encoding is AL32UTF8, sSymbol1 is correctly set to the Euro sign.
Second observation: correct result of sSymbol3 depends from NLS_LANG-encoding set on the client. It should not depend from NLS_LANG encoding.
I have the impression that the select-statement itself goes through a conversion path (UTF8?) which is not the same as the conversion of bind and into variables (UTF-16).
TD-4047: TD 5.1 with Oracle router: simple fetch fails
Re: TD-4047: TD 5.1 with Oracle router: simple fetch fails
Hi
I guess we agree :
TD-4046
TD510 Native router: For an ORACLE database instance set to WE8MSWIN1252 and client NLS_LANG=UTF8 OR AL32UTF8 OR WE8MSWIN1252 ,selecting from dual table via bind variable the euro symbol returns nothing
TD-4047
TD510 Native router: For an ORACLE database instance set to WE8MSWIN1252 with client NLS_LANG=WE8MSWIN1252 ONLY selecting from dual table euro symbol using litteral returns 'garbage'.
This is certainly as designed since it is in the release note :
"Passing Unicode data with Oracle
With the Oracle database you need to set the NLS_LANG environment variable on the client side in order to pass unicode data."
Right, but since TD510 is UNICODE ENABLED then why should the user need to take care of that NLS_LANG consideration and risk potential data loss. Also with OLEDB you do not get this problem...So this is why I entered this issue as an improvment to the native router.
Many thanks
Jean-Marc
I guess we agree :
TD-4046
TD510 Native router: For an ORACLE database instance set to WE8MSWIN1252 and client NLS_LANG=UTF8 OR AL32UTF8 OR WE8MSWIN1252 ,selecting from dual table via bind variable the euro symbol returns nothing
TD-4047
TD510 Native router: For an ORACLE database instance set to WE8MSWIN1252 with client NLS_LANG=WE8MSWIN1252 ONLY selecting from dual table euro symbol using litteral returns 'garbage'.
This is certainly as designed since it is in the release note :
"Passing Unicode data with Oracle
With the Oracle database you need to set the NLS_LANG environment variable on the client side in order to pass unicode data."
Right, but since TD510 is UNICODE ENABLED then why should the user need to take care of that NLS_LANG consideration and risk potential data loss. Also with OLEDB you do not get this problem...So this is why I entered this issue as an improvment to the native router.
Many thanks
Jean-Marc
Re: TD-4047: TD 5.1 with Oracle router: simple fetch fails
SP2 Update:
TD-4047 appears solved, correct result independent of client NLS_LANG encoding.
Symptoms of the first problem have changed. First you have to declare sSymbol1 as a Long String.
The assignment is not represented correctly in my OP anymore.
If the right side is a literal containing the Euro symbol only (SalStrLength = 1)
Set sEuro = '€'
Select :sEuro from dual into :sSymbol1
works as expected with DB encoding WE8MSWIN1252.
With DB encoding AL32UTF8, I get SqlPrepareAndExecute error
ORA-01460: unimplemented or unreasonable conversion requested
If the Euro sign is followed by a dot, execution is ok.
The condition for the error message seems to be a single Unicode character with UTF-8 representation longer than two bytes, same error message with a smiley U+263a.
TD-4047 appears solved, correct result independent of client NLS_LANG encoding.
Symptoms of the first problem have changed. First you have to declare sSymbol1 as a Long String.
The assignment is not represented correctly in my OP anymore.
If the right side is a literal containing the Euro symbol only (SalStrLength = 1)
Set sEuro = '€'
Select :sEuro from dual into :sSymbol1
works as expected with DB encoding WE8MSWIN1252.
With DB encoding AL32UTF8, I get SqlPrepareAndExecute error
ORA-01460: unimplemented or unreasonable conversion requested
If the Euro sign is followed by a dot, execution is ok.
The condition for the error message seems to be a single Unicode character with UTF-8 representation longer than two bytes, same error message with a smiley U+263a.
Who is online
Users browsing this forum: [Ccbot] and 0 guests