From: Hokwon Song Date: Wed, 3 Apr 2013 09:04:13 +0000 (+0900) Subject: fix a decfect locale for france locale X-Git-Tag: accepted/tizen_2.1/20130425.034849~171^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8f4c0b2e3b27ecb49720bb89135e9f476e0d3cc8;p=framework%2Fosp%2Fappfw.git fix a decfect locale for france locale Change-Id: I9de789350e5da3a781964521a2864eaa8bbd8735 Signed-off-by: Hokwon Song --- diff --git a/src/locales/FLcl_LocaleData.cpp b/src/locales/FLcl_LocaleData.cpp index f4a6a43..8c249f8 100644 --- a/src/locales/FLcl_LocaleData.cpp +++ b/src/locales/FLcl_LocaleData.cpp @@ -21,6 +21,7 @@ */ // Includes +#include #include #include #include @@ -86,13 +87,17 @@ _LocaleData::GetIcuString(const String& ospStr) String _LocaleData::GetOspString(const IcuUnicodeString& icuStr) { + setlocale(LC_ALL, "C"); int len = icuStr.length(); // get length if (len) // if icuStr is not empty { char out[len * 3 + 1]; // Create buffer of thrice the icuStr length - out[icuStr.extract(0, len, out)] = 0; // icuStr.extract() converts Unicode to UTF8 + int end = icuStr.extract(0, len, out); + out[end] = 0; // icuStr.extract() converts Unicode to UTF8 + setlocale(LC_ALL, ""); return String(out); } + setlocale(LC_ALL, ""); return String(""); } diff --git a/src/locales/FLcl_NumberFormatterImpl.cpp b/src/locales/FLcl_NumberFormatterImpl.cpp index 3ee1f5d..661899f 100644 --- a/src/locales/FLcl_NumberFormatterImpl.cpp +++ b/src/locales/FLcl_NumberFormatterImpl.cpp @@ -19,9 +19,9 @@ * @file FLclNumberFormatterEx.cpp * @brief This is the implementation file for the NumberFormatterEx class. */ - #include #include +#include #include #include @@ -132,6 +132,7 @@ _NumberFormatterImpl::Format(long number, String& str, _FieldPosition pos) const result _NumberFormatterImpl::Format(double number, String& str, _FieldPosition pos) const { + setlocale(LC_ALL, "C"); IcuUnicodeString icuStr; IcuFieldPosition icuPos = _LocaleData::GetIcuFieldPosition(pos); icuStr = __pIcuNumberFormatter->format(number, icuStr, icuPos);