标签:
http://csharpindepth.com/Articles/General/Unicode.aspx
This is a big topic. Don‘t expect this page to do more than scratch the surface - indeed, if you believe you‘re already fairly experienced and knowledgeable about character encodings and the like, this page may well not have anything new or useful for you. However, there are still many people who don‘t understand the difference between binary and text, or know what a character encoding is, etc. It is for these people that this page has been written. It mentions a few advanced topics, but only to make the reader aware of their existence, rather than to give much guidance on them.
可以去原文看链接
Most modern computer languages (and some older ones) make a big distinction between "binary" content and "character" (or "text") content .
The difference is largely the same as the instinctive本能的;直觉的;天生的 one, but for the purposes of clarity清楚,明晰;透明, I‘ll define it here as:
The Unicode Glossary defines a character as:
That may or may not be a terribly useful definition to you, but for the most part you can again use your instinctive understanding - a character is something like "the capital letter A", "the digit 1" etc. There are other characters which are less obvious, such as: combining characters such as "an acute accent", control characters such as "newline", and formatting characters (invisible, but affect surrounding characters). The important thing is that these are fundamentally "text" in some form or other. They have some meaning attached to them.
Now, unfortunately in the past, this distinction has been very blurred - C programmers are often used to thinking of "byte" and "char" as being interchangeable, to the extent that they will talk about reading a certain number of characters, even when the content is entirely binary. In modern environments such as .NET and Java, where the distinction is clear and present in the IO libraries, this can lead to people attempting to copy binary files by reading and writing characters, resulting in corrupt output.
标签:
原文地址:http://www.cnblogs.com/chucklu/p/5231872.html