Quantcast
Channel: 2,000 Things You Should Know About C# » Unicode
Browsing all 10 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

#996 – UTF-16 Encoding, Part I

Unicode maps characters into their corresponding code points, i.e. a numeric value that represents that character.  A character encoding scheme then dictates how each code point is represented as a...

View Article



Image may be NSFW.
Clik here to view.

#997 – UTF-16 Encoding, Part II

Unicode maps characters into their corresponding code points, i.e. a numeric value that represents that character.  A character encoding scheme then dictates how each code point is represented as a...

View Article

Image may be NSFW.
Clik here to view.

#998 – UTF-8 Encoding

Unicode maps characters into their corresponding code points, i.e. a numeric value that represents that character.  A character encoding scheme then dictates how each code point is represented as a...

View Article

Image may be NSFW.
Clik here to view.

#999 – Some Examples of UTF-16 and UTF-8 Encoding

Unicode maps characters into their corresponding code points, i.e. a numeric value that represents that character.  A character encoding scheme then dictates how each code point is represented as a...

View Article

Image may be NSFW.
Clik here to view.

#1,000 – UTF-8 and ASCII

UTF-8 is a character encoding scheme for Unicode character data that uses from 1-4 bytes to represent each character, depending on the code point of the character to be represented. In Unicode, code...

View Article


Image may be NSFW.
Clik here to view.

#1,001 – Representing Unicode Surrogate Pairs

UTF-16 encodes Unicode code points above U+FFFF using surrogate pairs that take up 4 bytes. You can specify a surrogate pair within a string literal by inserting the character directly into the string...

View Article

Image may be NSFW.
Clik here to view.

#1,002 – Specifying Character Encoding when Writing to a File

In .NET, string data is stored in memory as Unicode data encoded as UTF-16 (2 bytes per character, or 4 bytes for surrogate pairs). When you persist string data out to a file, however, you must be...

View Article

Image may be NSFW.
Clik here to view.

#1,003 – Accessing Underlying Bytes in a String for Different Encodings

Strings in .NET are stored in memory as Unicode character data, using the UTF-16 encoding.  (2 bytes per character, or 4 bytes for surrogate pairs). If you want to get access to the underlying data for...

View Article


Image may be NSFW.
Clik here to view.

#1,006 – Getting the Length of a String

You can use the string.Length property to get an integer representing the length of a string.  In most cases, length means–the number of characters. // 3 Latin (ASCII) characters string simple = "abc";...

View Article


Image may be NSFW.
Clik here to view.

#1,007 – Getting Length of String that Contains Surrogate Pairs

You can use the string.Length property to get the length (number of characters) of a string.  This only works, however, for Unicode code points that are no larger than U+FFFF.  This set of code points...

View Article
Browsing all 10 articles
Browse latest View live


Latest Images