What is the difference between Unicode MultiByte String?

abc abc 351 Reputation points
2021-11-22T05:19:36.73+00:00

Hi,

In C++ and Vc++ what is the difference between Unicode MultiByte CharacterSet String?
Can I use MBCS for all languages? What are the languages supported by MBCS?
When we need to use Unicode in compiler setting and when we need to use MBCS?

Thanks.

Developer technologies | C++
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Guido Franzke 2,191 Reputation points
    2021-11-22T06:57:42.847+00:00

    Hello,
    there are many such questions and answers in the web: search
    All new Visual Studio projects set Unicode as a default.
    Regards, Guido

    1 person found this answer helpful.

  2. Petrus 【KIM】 546 Reputation points
    2021-11-22T07:00:31.233+00:00
    0 comments No comments

  3. YujianYao-MSFT 4,296 Reputation points Microsoft External Staff
    2021-11-22T08:12:17.7+00:00

    Hi @abc abc ,

    Windows uses two character sets: ANSI and UNICODE. Among them, Unicode represents a character with 16/32 bits, and ANSI represents a character with 8 bits. The ANSI character standard uses 8 bits to represent a character, so there is no problem with ANSI being used to represent letters and numbers and common characters. But it cannot represent large character sets, such as Japanese and Chinese. The Unicode character standard uses 16/32 bits to represent a character, so Unicode can be used to represent Chinese or Japanese. In other words, Unicode is wider than ANSI and has a larger range. I have found some documents for you, please check Unicode and Multibyte Character Set (MBCS) Support and Unicode and MBCS carefully.

    Best regards,

    Elya


    If the answer is the right solution, please click "Accept Answer" and upvote it.If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.