未验证 提交 9ecf4b82 编写于 作者: O openharmony_ci 提交者: Gitee

!155 fix character isRTL

Merge pull request !155 from sunyaozu/master
......@@ -43,7 +43,8 @@ bool IsRTLCharacter(const std::string &character)
{
icu::UnicodeString unicodeString(character.c_str());
UChar32 char32 = unicodeString.char32At(0);
return u_hasBinaryProperty(char32, UCHAR_BIDI_MIRRORED);
UCharDirection direction = u_charDirection(char32);
return direction == UCharDirection::U_RIGHT_TO_LEFT;
}
bool IsIdeoGraphic(const std::string &character)
......
......@@ -26,7 +26,7 @@ namespace OHOS {
namespace Global {
namespace I18n {
const char *PreferredLanguage::RESOURCE_PATH_HEAD = "/data/accounts/account_0/applications/";
const char *PreferredLanguage::RESOURCE_PATH_TAILOR = "/resources.index";
const char *PreferredLanguage::RESOURCE_PATH_TAILOR = "/assets/entry/resources.index";
const char *PreferredLanguage::RESOURCE_PATH_SPLITOR = "/";
const char *PreferredLanguage::PREFERRED_LANGUAGES = "persist.sys.preferredLanguages";
static constexpr OHOS::HiviewDFX::HiLogLabel LABEL = { LOG_CORE, 0xD001E00, "LocaleConfig" };
......@@ -129,9 +129,9 @@ bool PreferredLanguage::RemovePreferredLanguage(int index)
return false;
}
std::vector<std::string>::iterator it = preferredLanguageList.begin();
preferredLanguageList.erase(it + index);
preferredLanguageList.erase(it + idx);
bool status = false;
if (index == 0) {
if (idx == 0) {
status = LocaleConfig::SetSystemLanguage(preferredLanguageList[0]);
if (!status) {
return false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册