Fix N_SE-46938 for tz list.
authorHokwon Song <hokwon.song@samsung.com>
Fri, 19 Jul 2013 07:38:22 +0000 (16:38 +0900)
committerHokwon Song <hokwon.song@samsung.com>
Fri, 19 Jul 2013 07:38:22 +0000 (16:38 +0900)
Change-Id: I82fb9ab04b8f1c840798706c6e75df6bdefb477a
Signed-off-by: Hokwon Song <hokwon.song@samsung.com>
src/locales/FLcl_LocaleManagerImpl.cpp

index bcfecbb..00712e4 100644 (file)
@@ -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())))