Uploaded image for project: 'Core ReactOS'
  1. Core ReactOS
  2. CORE-7415

Fix VS building when the default code page is a MBCS

    XMLWordPrintable

Details

    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

          There are no Sub-Tasks for this issue.

          Activity

            People

              AmineKhaldi AmineKhaldi
              Yuntian Zhang Yuntian Zhang
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: