Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-7304

[PATCH] build failure in cp932 Windows environment caused by ISO-8859 incompatibility

Details

    Description

      ISO-8859 encoding does not have encoding compatibilty against cp932(Windows-31J) which is mainly used in Japanese edition of Windows.
      This incompatibility causes following build failure:

      ~~~
      c:\jw\workspace\dmbvc2013\powershell\work\source\storage\connect\frids.h(25): error C2001: 定数が 2 行目に続いています。 [C:\jw\workspace\dmbvc2013\powershell\work\build-vc2013-zip-32\storage\connect\connect.vcxproj]

      c:\jw\workspace\dmbvc2013\powershell\work\source\storage\connect\frids.h(26): error C2143: 構文エラー : ';' が 'case' の前にありません。 [C:\jw\workspace\dmbvc2013\powershell\work\build-vc2013-zip-32\storage\connect\connect.vcxproj]

      c:\jw\workspace\dmbvc2013\powershell\work\source\storage\connect\frids.h(26): error C2001: 定数が 2 行目に続いています。 [C:\jw\workspace\dmbvc2013\powershell\work\build-vc2013-zip-32\storage\connect\connect.vcxproj]

      c:\jw\workspace\dmbvc2013\powershell\work\source\storage\connect\frids.h(27): error C2143: 構文エラー : ';' が 'case' の前にありません。 [C:\jw\workspace\dmbvc2013\powershell\work\build-vc2013-zip-32\storage\connect\connect.vcxproj]
      ~~~

      ISO-8859's `é";' string does not correctly interpret in cp932 env by MSVC.
      At least, this curious bug can prevent when "frids.h" is saved by UTF-8 encoding.

      Attached "friids.h" is saved with UTF-8 encoding and build log in cp932 environment.

      Attachments

        Activity

          Curious bug indeed because only lines 25, 26, 27 raise an error while many other lines contain the same not understood characters (1, 3, 7, 12, 14, 20, 41, 44)

          I am not sure I understood what you said by At least, this curious bug can prevent when "frids.h" is saved by UTF-8 encoding.

          Did you mean that saving this file in UTF-8 fixes the bug? If so, thanks for telling me how to fix this bug. Note that the file frcas.h should also be UTF-8 encoded although it is not included in your particular build.

          If not, if you work on a source distribution, just remove or comment out lines 35 to 42 into rcmsg.c.

          As a matter of fact, all this business is to prepare for future versions that should provide the ability to choose the language used for messages. However, as this bug shows, this is not yet operational and documented.

          bertrandop Olivier Bertrand added a comment - Curious bug indeed because only lines 25, 26, 27 raise an error while many other lines contain the same not understood characters (1, 3, 7, 12, 14, 20, 41, 44) I am not sure I understood what you said by At least, this curious bug can prevent when "frids.h" is saved by UTF-8 encoding. Did you mean that saving this file in UTF-8 fixes the bug? If so, thanks for telling me how to fix this bug. Note that the file frcas.h should also be UTF-8 encoded although it is not included in your particular build. If not, if you work on a source distribution, just remove or comment out lines 35 to 42 into rcmsg.c. As a matter of fact, all this business is to prepare for future versions that should provide the ability to choose the language used for messages. However, as this bug shows, this is not yet operational and documented.

          > Did you mean that saving this file in UTF-8 fixes the bug?

          Yes, I mean saving this file with UTF-8 to fix bug.

          > If so, thanks for telling me how to fix this bug.

          It's my pleasure.
          But, this is quick fix.
          It is better fix way is to separate file which is for Windows and which is for other platform.

          You might already know that gcc cannot read source saved by UTF-8 with BOM.
          But, MSVC cannot treat UTF-8 encoding without BOM in cp932 environment.

          > If not, if you work on a source distribution, just remove or comment out lines 35 to 42 into rcmsg.c.

          Sorry, I can't do this strategy.
          I'm packaging Mroonga for Windows.
          Mroonga project is not preferred having patch locally.
          This project is preferred to report upstream to fix build failure even if for Windows environment problem.

          cosmo0920 hiroshi HATAKE added a comment - > Did you mean that saving this file in UTF-8 fixes the bug? Yes, I mean saving this file with UTF-8 to fix bug. > If so, thanks for telling me how to fix this bug. It's my pleasure. But, this is quick fix. It is better fix way is to separate file which is for Windows and which is for other platform. You might already know that gcc cannot read source saved by UTF-8 with BOM. But, MSVC cannot treat UTF-8 encoding without BOM in cp932 environment. > If not, if you work on a source distribution, just remove or comment out lines 35 to 42 into rcmsg.c. Sorry, I can't do this strategy. I'm packaging Mroonga for Windows. Mroonga project is not preferred having patch locally. This project is preferred to report upstream to fix build failure even if for Windows environment problem.
          bertrandop Olivier Bertrand added a comment - - edited

          Fixed by just commenting out the loading of French message files until this feature is fully implemented.

          bertrandop Olivier Bertrand added a comment - - edited Fixed by just commenting out the loading of French message files until this feature is fully implemented.

          People

            bertrandop Olivier Bertrand
            cosmo0920 hiroshi HATAKE
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.