Problem with hungarian accentuated letters

Problem with hungarian accentuated letters

Postby gabornemeth » Tue 14 Jul 2009 07:08

Hi,

I use the Express edition of dotConnect for Oracle. It seems that accentuated letters somehow converts to their non accentuated pair when retreiving data from the database. e.g instead of 'á' i get 'a'.
With Oracle ODP.NET it works fine, and with other data sources I've got no problems with dotConnect either. What should I take care of?

I've logged the client and server version, the OracleConnection.GetDatabaseInfo(), OracleConnection.GetSessionInfo(), OracleGlobalization.GetApplicationInfo().
I've tried OracleConnection.SetSessionInfo and OracleGlobalization.SetApplicationInfo for setting hungarian language without success.

7/13/2009 4:34:45 PM: Client version: 10.2.0.1

7/13/2009 4:34:45 PM: Server version: 10.2.0.1

7/13/2009 4:34:45 PM: Database information:
ClientCharacterSet:
Currency: $
DateFormat: DD-MON-RR
DateLanguage: AMERICAN
DualCurrency: $
ISOCurrency: AMERICA
Language: AMERICAN
NCharConversionException: False
NumericCharacters: .,
Territory: AMERICA
TimeStampFormat: DD-MON-RR HH.MI.SSXFF AM
TimeStampTZFormat: DD-MON-RR HH.MI.SSXFF AM TZH:TZM
TimeZone:


7/13/2009 4:34:45 PM: Session information:
ClientCharacterSet:
Currency: $
DateFormat: DD-MON-RR
DateLanguage: AMERICAN
DualCurrency: $
ISOCurrency: AMERICA
Language: AMERICAN
NCharConversionException: False
NumericCharacters: .,
Territory: AMERICA
TimeStampFormat: DD-MON-RR HH.MI.SSXFF AM
TimeStampTZFormat: DD-MON-RR HH.MI.SSXFF AM TZH:TZM
TimeZone:


7/13/2009 4:34:45 PM: Application information:
ClientCharacterSet: US7ASCII
Currency: $
DateFormat: fmMMfm/fmDDfm/YYYY
DateLanguage: AMERICAN
DualCurrency: $
ISOCurrency: AMERICA
Language: AMERICAN
NCharConversionException: True
NumericCharacters: .,
Territory: AMERICA
TimeStampFormat: fmMMfm/fmDDfm/YYYY fmHH12fm:MI:SS AM
TimeStampTZFormat: fmMMfm/fmDDfm/YYYY fmHH12fm:MI:SS AM TZH:TZM
TimeZone: +02:00
gabornemeth
 
Posts: 2
Joined: Tue 14 Jul 2009 06:58

Postby Shalex » Tue 14 Jul 2009 08:08

Please add the "Unicode=true;" entry to your connection string.

Here is a general information how the Unicode property affects the work of dotConnect for Oracle.

The Unicode property defines the charset that will be used at the network level for string transferring. The choice of this option has influence on the amount of conversions in the program and the possibility of data loss. If the Unicode property is set to true, UTF8 is used at the network level. Otherwise, the charset from regional settings of OS is used.
a) If Unicode=true, the following scheme is implemented:
UTF8 (stored at the server) -> UTF8 (transported through the network) -> UTF16 (string in .NET).
b) If Unicode=true:
UTF16 -> UTF8 -> UTF16. Unfortunately, UTF16 can not be used at the network level.
c) If Unicode=false:
WE8MSWIN1252->WE8MSWIN1252->UTF16.

If Unicode=false, the encoding works in the following way. Here is a chain of data transformation:
your database encoding (NLS_CHARACTERSET) ->
Oracle client encoding (e.g., HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOME0, the NLS_LANG key value) ->
the Encoding.Default value (it is equal to the regional settings of your machine) ->
.NET string (UTF16).
Shalex
Devart Team
 
Posts: 7304
Joined: Thu 14 Aug 2008 12:44

Postby gabornemeth » Tue 14 Jul 2009 08:51

This was the solution. Thank you for your help and good explanation.
gabornemeth
 
Posts: 2
Joined: Tue 14 Jul 2009 06:58


Return to dotConnect for Oracle