unicode strings
-
Do I need to do anything special to handle unicode. (Japanese characters) Or will regular string variables work for that? Thanks, Elena
-
Do I need to do anything special to handle unicode. (Japanese characters) Or will regular string variables work for that? Thanks, Elena
Strings in .NET are stored in Unicode. To type Unicode characters, use
\uxxxx
wherexxxx
is the hexidecimal Unicode characters. See theTextInfo
class for additional information, such as enumerating Unicode characters (since characters may be made-up of multiple codepoints). Be careful when marshaling strings to unmanaged code. See theDllImportAttribute.CharSet
andStructLayoutAttribute.CharSet
fields in the .NET Framework SDK documentation. The default isCharSet.Ansi
, which will marshal the Unicode string as ANSI (ASCII plus whatever codepage is appropriate).Software Design Engineer Developer Division Sustained Engineering, Microsoft My Articles