Home > Back-end >  Questions about the string coding
Questions about the string coding

Time:02-10

Often when dealing with Chinese string to gibberish,

Ever explain why the code system of knowledge, and all kinds of c + + string and wstring, the relationship between char and related with the code? A lot of search on the net to find suitable link

Under the same JAVA how to deal with, is there a similar book?

CodePudding user response:

Garbled words is generally caused by the current system does not support Chinese display, so it's best to use unicode strings in your code, char and a string is ANSI string, WCHAR and wstring is unicode strings, use unicode strings can basically solve the problem of most part of the code, is main or see the specific situation of the statement,

CodePudding user response:

On c + +, such as v, he is the default encoding of Unicode, in the properties page - general - can see in the character set, so you use the string, especially Chinese with _T (" "), L "" and so on, with wide character, if use multi-byte strings, is no.

CodePudding user response:

If you want to explore, to baidu Unicode \ \ ANSI utf - 8/16, etc, the difference between I think coding format is a very bad thing, can look after improvement
  • Related