From 4a51a2f4211ec619eb46040dceef338ecd9f85cf Mon Sep 17 00:00:00 2001 From: Travis Keep Date: Wed, 22 Apr 2015 21:54:15 +0000 Subject: [PATCH] ICU-11652 Change default padding character from astricks 0x002A to space 0x0020 X-SVN-Rev: 37378 --- icu4c/source/i18n/decimalformatpattern.cpp | 4 ++-- icu4c/source/i18n/decimfmt.cpp | 2 +- icu4c/source/test/intltest/numfmtst.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/icu4c/source/i18n/decimalformatpattern.cpp b/icu4c/source/i18n/decimalformatpattern.cpp index a0ac40a25d1..d559b69f317 100644 --- a/icu4c/source/i18n/decimalformatpattern.cpp +++ b/icu4c/source/i18n/decimalformatpattern.cpp @@ -1,6 +1,6 @@ /* ******************************************************************************* -* Copyright (C) 1997-2014, International Business Machines Corporation and * +* Copyright (C) 1997-2015, International Business Machines Corporation and * * others. All Rights Reserved. * ******************************************************************************* */ @@ -91,7 +91,7 @@ DecimalFormatPattern::DecimalFormatPattern() fFormatWidth(0), fRoundingIncrementUsed(FALSE), fRoundingIncrement(), - fPad(kPatternPadEscape), + fPad(kDefaultPad), fNegPatternsBogus(TRUE), fPosPatternsBogus(TRUE), fNegPrefixPattern(), diff --git a/icu4c/source/i18n/decimfmt.cpp b/icu4c/source/i18n/decimfmt.cpp index def17a11ecf..0478c07ccc4 100644 --- a/icu4c/source/i18n/decimfmt.cpp +++ b/icu4c/source/i18n/decimfmt.cpp @@ -448,7 +448,7 @@ DecimalFormat::construct(UErrorCode& status, fSymbols = symbolsToAdopt; // Do this BEFORE aborting on status failure!!! fRoundingIncrement = NULL; fRoundingMode = kRoundHalfEven; - fPad = kPatternPadEscape; + fPad = kDefaultPad; fPadPosition = kPadBeforePrefix; if (U_FAILURE(status)) return; diff --git a/icu4c/source/test/intltest/numfmtst.cpp b/icu4c/source/test/intltest/numfmtst.cpp index 9d108cb28cf..0ec4d0d175b 100644 --- a/icu4c/source/test/intltest/numfmtst.cpp +++ b/icu4c/source/test/intltest/numfmtst.cpp @@ -7373,7 +7373,7 @@ void NumberFormatTest::Test10468ApplyPattern() { fmt.applyPattern("AA#,##0.00ZZ", status); // Oops this still prints 'a' even though we changed the pattern. - if (fmt.getPadCharacterString() != UnicodeString("*")) { + if (fmt.getPadCharacterString() != UnicodeString(" ")) { errln("applyPattern did not clear padding character."); } }