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

fix bug: deserialization of chinese encoding characters in xml/yml would be incorrect #3867

Open
wants to merge 1 commit into
base: 2023.x
Choose a base branch
from

Conversation

carl-zk
Copy link

@carl-zk carl-zk commented Oct 5, 2024

Describe what this PR does / why we need it

nacos config center 中配置xml/yml,包含中文字符。
app启动参数配置了-Dfile.encoding=gb18030时,启动报错。
当-Dfile.encoding=utf-8时,启动正常。

Does this pull request fix one issue?

NONE

Describe how you did it

在 NacosDataParserHandler getBytes时,指定UTF-8编码

Describe how to verify it

复现

  1. 在配置中心新建一个config.xml,内容为
<a>中文</a>

2.项目启动参数配置:-Dfile.encoding=gb18030

Special notes for reviews

目前我没想到有更好的方法修复它,你们可以自己探索其它的方法。这个问题值得关注一下。
hope this PR will be help.

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.

1 participant