From 57061ec171bf9e5c70e3b2e1306cbbaa0ddfce5f Mon Sep 17 00:00:00 2001 From: Hokwon Song Date: Fri, 19 Jul 2013 16:38:22 +0900 Subject: [PATCH] Fix N_SE-46938 for tz list. Change-Id: I82fb9ab04b8f1c840798706c6e75df6bdefb477a Signed-off-by: Hokwon Song --- src/locales/FLcl_LocaleManagerImpl.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/locales/FLcl_LocaleManagerImpl.cpp b/src/locales/FLcl_LocaleManagerImpl.cpp index bcfecbb..00712e4 100644 --- a/src/locales/FLcl_LocaleManagerImpl.cpp +++ b/src/locales/FLcl_LocaleManagerImpl.cpp @@ -352,6 +352,9 @@ _LocaleManagerImpl::GetAvailableTimeZonesN(U_ICU_NAMESPACE::StringEnumeration* p std::unique_ptr< String > pTimeZone(new (std::nothrow) String(pIcuTZStr)); SysTryReturn(NID_LCL, pTimeZone, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + pTimeZone->Replace(L"_", L" "); + if (!pTimeZoneMap->ContainsKey(*(pTimeZone.get())) && pTZMap->ContainsKey(*(pTimeZone.get()))) { std::unique_ptr< String > pDummyValue(new (std::nothrow) String()); @@ -616,6 +619,8 @@ _LocaleManagerImpl::GetAvailableTimeZonesFallbackN(void) SysTryReturn(NID_LCL, pTimeZone, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + pTimeZone->Replace(L"_", L" "); + if (!pTimeZoneMap->ContainsKey(*(pTimeZone.get()))) { std::unique_ptr< String > pDummyValue (new (std::nothrow) String()); @@ -650,7 +655,6 @@ _LocaleManagerImpl::GetAvailableTimeZonesN(void) SysLog(NID_LCL,"[E_FILE_NOT_FOUND] It is failed to get the tzlist from the ini file."); return GetAvailableTimeZonesFallbackN(); } -// SysTryReturn(NID_LCL, r == E_SUCCESS, null,E_FILE_NOT_FOUND, "[E_FILE_NOT_FOUND] It is failed to get the tzlist from the ini file."); pTimeZoneMap->Construct(); @@ -665,6 +669,7 @@ _LocaleManagerImpl::GetAvailableTimeZonesN(void) break; } SysTryReturn(NID_LCL, r == E_SUCCESS, null, r, "[%s] It is failed to read the tzlist.", GetErrorMessage(r)); + pTimeZone->Replace(L"_", L" "); pTimeZone->Replace(L"\n", L"\0"); if (!pTimeZoneMap->ContainsKey(*(pTimeZone.get()))) -- 2.7.4