What does this property do and when should I / should I not use it?
All strings in .NET are Unicode, what's a point to have this parameter then?
Are there any performance penalties/benefits for read/write data?
Could you please answer, when Unicode better be true:
a) Server character set is unicode UTF8 (NLS_CHARACTER=AL32UTF8)
b) Server character set is unicode UTF16 (NLS_CHARACTER=AL32UTF16)
c) Server character set is single byte encoding (f.e. NLS_CHARACTER= WE8MSWIN1252)
Thank you in advance,
Lex
OracleConnection.Unicode property
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 Windows 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.
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.