CHARSET conversions

tschuk

Member
Hello Marco,

I'm a bit confused with the charset conversions. My Oracle database uses AL32UTF8 and AL32UTF16 as charset/national charset. I configured my environment for WIN, i.e. setting the environment variable NLS_LANG=GERMAN_GERMANY.WE8MSWIN1252. I would expect that the oracle database does the charset conversion to 1252 (a 8 Bit charset).
Accessing a char column (database AL32UTF8 => should convert to WE8MSWIN1252) i get a mismatch: "TStringfield expected, TWideStringField found". The session property "ForceWideStringFields" is false.

Accessing a database with charset WE8MSWIN1252 works as expected.

Could you sheed some light on me what happens in the background?

thanks,
regards

Frank
 
The data that you fetch from an UTF8 database in a result set will always be in Unicode format, regardless of your NLS_LANG.

To suppress this you can set Oracle.NoUnicodeSupport to True in your application. You need to do this before your session connects to the database.

Now all character data is converted to the client character set. In your case WE8MSWIN1252. If the Unicode characters cannot be converted to WE8MSWIN1252 you will get question marks in the data.
 
Hello Marco,

thanks for your response. For my understanding - is this a behaviour/restriction of oracle or of DOA?

thanks,
regards

Frank
 
Back
Top