Details
-
Bug
-
Resolution: Fixed
-
Major
Description
When I say MBCS, I mean Chinese since I'm using Chinese version of Windows.
Most of the code pages are single-byte character sets. Any character is between 0x00 to 0xFF. But the eastern Asian version of Windows have multibyte character sets as default. To keep the capability with the ANSI, 0x00 to 0x7F have the same meaning. But if a byte is higher than 0x7F, system will pick up the next byte to represent a character.
While GCC relies on the fact that the byte between 0x00 to 0x7F will always have the same meaning, MSVC uses Windows API to look for next character. If a file in SBCS has a byte higher than 0x7F and a quotation mark(when you define a string, it is very common), MSVC will treat them as a single character and fail to compile since it can't find the quotation mark at the end of the line.
The best solution to this problem is to use UTF-8 when you need to work with different languages. But I'll only fix some of them because there are toooooooooo many files related with the languages.
I use base\setup\usetup\muilanguages.h as a reference when I need to find the code page.
RosBE: PASS
VS 2012: PASS
Attachments
Issue Links
- relates to
-
CORE-9607 Fix source files containing non-ASCII chars for building on DBCS systems (MSVC)
- Open
1.
|
Fix kbdcz building error | Resolved | AmineKhaldi | |
2.
|
Fix kbdhu building error | Resolved | AmineKhaldi | |
3.
|
Fix usetup building error | Resolved | AmineKhaldi | |
4.
|
Fix ntvdm building error | Resolved | AmineKhaldi | |
5.
|
Fix kernel32 building error | Resolved | AmineKhaldi |