ASCII code believe very familiar with, but they have been unable to remember the Basic Law, sometimes used up very uncomfortable.
ASCII, a total of 7 digits, representing 128 characters, typically preceded by a 0 complement of 8 bits to form a bit. 0~31 and 127 are control characters, cannot be printed, 32 is a space, and (hex:0x30) is 0;65 (hex:0x41) is a;97 (hex:0x61) is a.
Gb2312:ansi encoding, a ASNI encoding the most initial ASCII code expansion, in order to meet the domestic use of Chinese characters in the computer needs, the Chinese National Standards Administration issued a series of men's character set national standard Code, collectively known as GB Code, or GB code. One of the most influential is the "basic set of Chinese character encoding characters for Information interchange", which was issued in 1980, the standard number is GB 2312-1980, because its use is very common, also commonly known as GB code. GB2312 is a simplified Chinese character set, consisting of 6,763 commonly used Chinese characters and 682 of full-width non-Chinese characters. GB2312 encoding represents a Chinese character in two bytes, so it is theoretically possible to represent 256x256=65536 characters. (Excerpt from Baidu Encyclopedia)
GBK: Chinese character inner code expands the standard, K is the expansion in Hanyu Pinyin "expands" the word initials. GBK compatible with GB2312, a total of 21,003 Chinese characters, 883 symbols, and provide 1894 character-word code. (Excerpt from Baidu Encyclopedia)
Unicode: Incorporating all the symbols in the world, including English, Japanese, Chinese, and so on, can now accommodate 100多万个 symbols. This is not efficient, so UTF-8 appears, it can be based on different symbols automatically choose the length of the code.
UTF-8 encoding of Strings in iOS: UTF-8 format for output str strings
[Str stringbyaddingpercentescapesusingencoding:nsutf8stringencoding];
Decoding: Decoding of STR strings with UTF-8 rules
[Str stringbyreplacingpercentescapesusingencoding:nsutf8stringencoding];