提交 e887c3e3 编写于 作者: O openharmony_ci 提交者: Gitee

!79 fix GetSystemRegion coding problem

Merge pull request !79 from c大神群里的小喽啰/OpenHarmony-3.0-LTS
......@@ -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.
先完成此消息的编辑!
想要评论请 注册