提交 37aab506 编写于 作者: T the-minions-of-cplu

fix GetSystemRegion coding problem

Signed-off-by: Nthe-minions-of-cplu <jinqi2@huawei.com>
上级 85d66fc3
......@@ -95,8 +95,9 @@ string LocaleConfig::GetSystemRegion()
char value[CONFIG_LEN];
int code = GetParameter(LOCALE_KEY, "", value, CONFIG_LEN);
if (code > 0) {
string tag(value, code);
UErrorCode status = U_ZERO_ERROR;
icu::Locale origin = icu::Locale::forLanguageTag(value, status);
icu::Locale origin = icu::Locale::forLanguageTag(tag, status);
if (status == U_ZERO_ERROR) {
return origin.getCountry();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册