sal/qa/rtl/textenc/rtl_textcvt.cxx | 9 +++++++++ sal/textenc/tcvtmb.cxx | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-)
New commits: commit 411e4d15ff278c4fec77126f29916b5600aefbfb Author: Stephan Bergmann <[email protected]> AuthorDate: Thu Sep 5 09:57:32 2019 +0200 Commit: Stephan Bergmann <[email protected]> CommitDate: Thu Sep 5 11:11:29 2019 +0200 Fix conversion of U+0000 in ImplUnicodeToDBCS ...which appears to have been broken when 13824735057ef25075af8fd0ddb8f14e34c7eeb6 "#81346# - Fix for unconverted characters for DBCS encodings" moved that "if" out of surrounding "if" block. (And, for consistency, write the "if" check in the same way as the preceding one is written since 739cb04c36524c5a1bbf768dfe93624a1b2ec8b4 "#97705# Fixed mapping of Big5 EUDC points.") Change-Id: I4324197c4eba671ab6313fb89f988da102b8ffa5 Reviewed-on: https://gerrit.libreoffice.org/78627 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <[email protected]> diff --git a/sal/qa/rtl/textenc/rtl_textcvt.cxx b/sal/qa/rtl/textenc/rtl_textcvt.cxx index af9ccca345e7..068e727d53cb 100644 --- a/sal/qa/rtl/textenc/rtl_textcvt.cxx +++ b/sal/qa/rtl/textenc/rtl_textcvt.cxx @@ -1765,6 +1765,15 @@ void Test::testComplex() { RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR }, #if WITH_LOCALE_ALL || WITH_LOCALE_ja { RTL_TEXTENCODING_SHIFT_JIS, + RTL_CONSTASCII_STRINGPARAM("\x00"), + {0x0000}, + 1, + true, + true, + true, + false, + RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR }, + { RTL_TEXTENCODING_SHIFT_JIS, RTL_CONSTASCII_STRINGPARAM( "\x87\x40\x87\x41\x87\x42\x87\x43\x87\x44\x87\x45\x87\x46" "\x87\x47\x87\x48\x87\x49\x87\x4A\x87\x4B\x87\x4C\x87\x4D" diff --git a/sal/textenc/tcvtmb.cxx b/sal/textenc/tcvtmb.cxx index 4e990cc1e91e..89e89c56c628 100644 --- a/sal/textenc/tcvtmb.cxx +++ b/sal/textenc/tcvtmb.cxx @@ -320,7 +320,7 @@ sal_Size ImplUnicodeToDBCS( const void* pData, SAL_UNUSED_PARAMETER void*, } } - if ( !cConv ) + if (cConv == 0 && c != 0) { if ( nFlags & RTL_UNICODETOTEXT_FLAGS_UNDEFINED_REPLACE ) { _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
