From 3b694409bb2f08f354066373175a7cccbe902182 Mon Sep 17 00:00:00 2001 From: Pranay Chauhan Date: Fri, 24 Nov 2023 12:15:10 +0530 Subject: [PATCH] [M114 Migration] Always set LC_NUMERIC category to 'C' locale WebVTT's float type position was converted to incorrect css property string in which ',' is used as decimal point when the locale of LC_NUMERIC category is DE. blink::String::Format() should always use '.' as decimal point when converting floats to strings regardless of current locale. This patch always set LC_NUMERIC category to 'C' locale. Reference: https://review.tizen.org/gerrit/291129 Change-Id: I601e1ba7e56e5649e078acbc968b5f962f449624 Signed-off-by: Pranay Chauhan --- tizen_src/chromium_impl/content/common/locale_efl.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tizen_src/chromium_impl/content/common/locale_efl.cc b/tizen_src/chromium_impl/content/common/locale_efl.cc index f2b72cc6628a..7cac7ef94a6e 100644 --- a/tizen_src/chromium_impl/content/common/locale_efl.cc +++ b/tizen_src/chromium_impl/content/common/locale_efl.cc @@ -91,6 +91,11 @@ void PlatformLanguageChanged(keynode_t* keynode, void* data) { if (!setlocale(LC_ALL, str_lang.c_str())) LOG(WARNING) << "Failed to set LC_ALL to: " << str_lang.c_str(); + // blink::String::Format() should always use a decimal point when converting + // floats to strings. + if (!setlocale(LC_NUMERIC, "C")) + LOG(WARNING) << "Failed to set LC_NUMERIC to C"; + // Note: in case when someone will use IDS_BR_* from WebProcess this needs // to be enabled or those strings have to be moved to chromium locale files. // bindtextdomain("browser", "/usr/apps/org.tizen.browser/res/locale"); -- 2.34.1