From f2a0e4032734d6be635f14ade3dea499c29ec6c2 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 19 Jun 2015 10:20:55 +0200 Subject: Don't truncate a UTF-32 code point to a UTF-16 code unit Change-Id: Ie332b3d088547f6bcc676471182420766ecfedca --- i18npool/source/localedata/LocaleNode.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'i18npool') diff --git a/i18npool/source/localedata/LocaleNode.cxx b/i18npool/source/localedata/LocaleNode.cxx index 29adfabcea6d..bb8ea7119cf3 100644 --- a/i18npool/source/localedata/LocaleNode.cxx +++ b/i18npool/source/localedata/LocaleNode.cxx @@ -1216,7 +1216,7 @@ void LCFormatNode::generateCode (const OFileWriter &of) const { incErrorStr( "Error: failed to extract full date acceptance pattern: %s\n", aPattern); fprintf( stderr, " with DateSeparator '%s' from FormatCode '%s' (formatindex=\"%d\")\n", - OSTR( OUString( cDateSep)), OSTR( sTheDateEditFormat), + OSTR( OUString(&cDateSep, 1)), OSTR( sTheDateEditFormat), (int)cssi::NumberFormatIndex::DATE_SYS_DDMMYYYY); } else @@ -1224,7 +1224,7 @@ void LCFormatNode::generateCode (const OFileWriter &of) const fprintf( stderr, "Generated date acceptance pattern: '%s' from '%s' (formatindex=\"%d\" and defined DateSeparator '%s')\n", OSTR( aPattern), OSTR( sTheDateEditFormat), (int)cssi::NumberFormatIndex::DATE_SYS_DDMMYYYY, - OSTR( OUString( cDateSep))); + OSTR( OUString(&cDateSep, 1))); // Insert at front so full date pattern is first in checks. theDateAcceptancePatterns.insert( theDateAcceptancePatterns.begin(), aPattern); } @@ -1235,7 +1235,7 @@ void LCFormatNode::generateCode (const OFileWriter &of) const { incErrorStr( "Error: failed to extract 2nd date acceptance pattern: %s\n", aPattern2); fprintf( stderr, " with DateSeparator '%s' from FormatCode '%s' (formatindex=\"%d\")\n", - OSTR( OUString( cDateSep2)), OSTR( sTheDateEditFormat), + OSTR( OUString(&cDateSep2, 1)), OSTR( sTheDateEditFormat), (int)cssi::NumberFormatIndex::DATE_SYS_DDMMYYYY); } else -- cgit