| Summary: | Other: Build fails on Windows when system locale is "Japanese(Japan)" . | ||
|---|---|---|---|
| Product: | LibreOffice | Reporter: | Tomofumi Yagi <yagit> |
| Component: | LibreOffice | Assignee: | Not Assigned <libreoffice-bugs> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | ikuya |
| Priority: | medium | ||
| Version: | 4.2.0.0.alpha0+ Master | ||
| Hardware: | Other | ||
| OS: | Windows (All) | ||
| See Also: |
https://bugs.freedesktop.org/show_bug.cgi?id=66395 https://bugs.freedesktop.org/show_bug.cgi?id=66246 |
||
| Whiteboard: | BSA target:4.2.0 | ||
| Crash report or crash signature: | Regression By: | ||
| Attachments: |
Full error message
AutoControls.hrc Patch for adding BOM to .hrc file Patch for escaping UTF-8 chars |
||
|
Description
Tomofumi Yagi
2013-08-31 13:20:20 UTC
Created attachment 84970 [details]
AutoControls.hrc
Created attachment 84972 [details]
Patch for adding BOM to .hrc file
This problem is that MSVC interprets UTF-8 source code without BOM as local codepage when system locale is "Japanese(Japan)".
I attach a workaound patch in order to clarify the cause.
This patch tweaks transex3.
Tweaked transex3 outputs a *.hrc file with BOM.
*.hrc files with BOM avoid this problem.
Created attachment 85353 [details]
Patch for escaping UTF-8 chars
I attached a patch for escaping UTF-8 chars in .hrc file.
After all,I think that *.hrc file with BOM is better.
Escaping UTF-8 chars method has two disadvantages.
One is that Converted strings are very long.
This often occurs preprocessor error(the input line is too long).
Two is that it makes code unreadable.
I show an example.
1) Text[ en-US ] = "~Host name";
2) Text[ ja ] = "ใในใๅ(~H)"; // String of Japanese(UTF-8)
3) Text[ ja ] = "\xe3\x83\x9b\xe3\x82\xb9\xe3\x83\x88\xe5\x90\x8d(~H)"; // Escaped string of Japanese(UTF-8)
Tomofumi Yagi committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=fff70bf98c7a5a63aa0db11e93a3512c6a9a9359 fdo#68790: fix build error on Win when system locale=="Japanese(Japan)" The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback. Thank you so much for evaluation and merging of the patch. |