Unicode Support in Various Programming Languages

后端 未结 20 2002
醉话见心
醉话见心 2020-12-13 13:31

I\'d like to have a canonical place to pool information about Unicode support in various languages. Is it a part of the core language? Is it provided in libraries? Is it not

20条回答
  •  孤城傲影
    2020-12-13 13:57

    .NET (C#, VB.NET, ...)

    .NET stores strings internally as a sequence of System.Char objects. One System.Char represents a UTF-16 code unit.

    From the MSDN documentation on System.Char:

    The .NET Framework uses the Char structure to represent a Unicode character. The Unicode Standard identifies each Unicode character with a unique 21-bit scalar number called a code point, and defines the UTF-16 encoding form that specifies how a code point is encoded into a sequence of one or more 16-bit values. Each 16-bit value ranges from hexadecimal 0x0000 through 0xFFFF and is stored in a Char structure.

    Additional resources:

    • Strings in .NET and C# (by Jon Skeet).

提交回复
热议问题