Change-Id: I9de789350e5da3a781964521a2864eaa8bbd8735
Signed-off-by: Hokwon Song <hokwon.song@samsung.com>
*/
// Includes
+#include <locale.h>
#include <memory>
#include <stdlib.h>
#include <unistd.h>
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("");
}
* @file FLclNumberFormatterEx.cpp
* @brief This is the implementation file for the NumberFormatterEx class.
*/
-
#include <unique_ptr.h>
#include <unicode/decimfmt.h>
+#include <locale.h>
#include <FBaseSysLog.h>
#include <FLclNumberFormatter.h>
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);