Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bugfix] CodeUtils::utf8ToUnicode对某些字符不能正确进行UTF8到Unicode转换 #310

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

toruneko
Copy link

如果chr1的高位是0,Integer.toHexString会出现丢失前导0的情况。
所以需要判断并补上丢失的0,再进行16进制转换

比如中文间隔号 · 转换结果是\ub7,正确结果是\u00b7

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.5%) to 42.498% when pulling eb173fc on toruneko:master into 2ac5c82 on knightliao:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.5%) to 42.498% when pulling b566636 on toruneko:master into 2ac5c82 on knightliao:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.5%) to 42.498% when pulling 1f4979a on toruneko:master into 2ac5c82 on knightliao:master.

@toruneko
Copy link
Author

toruneko commented Jun 1, 2017

发现一个新的bug。
ConfigUpdateController::updateItem
ConfigMgr::notifyZookeeper
ConfigMgr::getConfVo
ConfigMgr::convert
confListVo.setValue(CodeUtils.unicodeToUtf8(config.getValue()));
在convert中,value从unicode转到utf8之后返回。
ConfigMgr::notifyZookeeper 中拿到utf8格式的value写入zk

但是在ConfigMgr::convert 中 调用getZkData,进行zk和db数据比较时,用的Config,即unicode。
因此比较结果是否定的。

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.5%) to 42.498% when pulling fc86769 on toruneko:master into 2ac5c82 on knightliao:master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants