diff options
author | Tomofumi Yagi <yagit@mknada.sakura.ne.jp> | 2013-09-07 10:04:30 +0900 |
---|---|---|
committer | Kohei Yoshida <libreoffice@kohei.us> | 2013-09-14 16:37:42 +0000 |
commit | fff70bf98c7a5a63aa0db11e93a3512c6a9a9359 (patch) | |
tree | e6087342c932fba75f92ebfba6944e435afe73b0 /l10ntools/inc | |
parent | 60486dda6be30ad0173feb06595f8de42d0efa16 (diff) |
fdo#68790: fix build error on Win when system locale=="Japanese(Japan)"
This patch modifies transex3.
Modified transex3 outputs a file with BOM(if MergeMode is true).
*.[hs]rc files with BOM avoid this problem.
This problem is that MSVC interprets UTF-8 source code without BOM as
local codepage when system locale is "Japanese(Japan)".
Change-Id: I3e12499a91a954236f48e6d7e360d26c93d19ed6
Reviewed-on: https://gerrit.libreoffice.org/5851
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Kohei Yoshida <libreoffice@kohei.us>
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
Diffstat (limited to 'l10ntools/inc')
-rw-r--r-- | l10ntools/inc/common.hxx | 2 | ||||
-rw-r--r-- | l10ntools/inc/export.hxx | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/l10ntools/inc/common.hxx b/l10ntools/inc/common.hxx index 5a12bbbbebe4..047d2f4f00b2 100644 --- a/l10ntools/inc/common.hxx +++ b/l10ntools/inc/common.hxx @@ -28,12 +28,14 @@ struct HandledArgs OString m_sMergeSrc; OString m_sLanguage; bool m_bMergeMode; + bool m_bUTF8BOM; HandledArgs() : m_sInputFile( OString() ) , m_sOutputFile( OString() ) , m_sMergeSrc( OString() ) , m_sLanguage( OString() ) , m_bMergeMode( false ) + , m_bUTF8BOM( false ) {} }; diff --git a/l10ntools/inc/export.hxx b/l10ntools/inc/export.hxx index 595c0273fb5f..b9d260375d1c 100644 --- a/l10ntools/inc/export.hxx +++ b/l10ntools/inc/export.hxx @@ -226,9 +226,11 @@ private: void CutComment( OString &rText ); + void WriteUTF8ByteOrderMarkToOutput() { *aOutput.mSimple << '\xEF' << '\xBB' << '\xBF'; } + public: Export( const OString &rOutput ); - Export(const OString &rMergeSource, const OString &rOutput, const OString &rLanguage); + Export(const OString &rMergeSource, const OString &rOutput, const OString &rLanguage, bool bUTF8BOM); ~Export(); void Init(); |