Skip to content

1.4.2版本application.properties配置项中有中文的话会乱码 #7361

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

Closed
eric39 opened this issue Nov 10, 2016 · 5 comments
Closed

1.4.2版本application.properties配置项中有中文的话会乱码 #7361

eric39 opened this issue Nov 10, 2016 · 5 comments
Labels
status: invalid An issue that we don't feel is valid

Comments

@eric39
Copy link

eric39 commented Nov 10, 2016

1.4.2版本application.properties配置项中有中文的话会乱码

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Nov 10, 2016
@wilkinsona
Copy link
Member

Translation courtesy of Google Translate:

1.4.2 version application.properties configuration items in the Chinese words will be garbled

@jiahuif
Copy link

jiahuif commented Nov 11, 2016

Translation by a human (me)
for version 1.4.2, if there are Chinese characters in application.properties, some garbled text will show up somewhere(should be clarified by the issue reporter) .

@jiahuif
Copy link

jiahuif commented Nov 11, 2016

The solution is pretty straightforward. Unicode in .properties files should be escaped. For example

foo=测试

should be

foo=\u6d4b\u8bd5

in .properties files. You can easily convert them with native2ascii

@wilkinsona
Copy link
Member

See #5361 for some background on why application.properties doesn't use UTF-8 as its encoding.

@wilkinsona wilkinsona added status: invalid An issue that we don't feel is valid and removed status: waiting-for-triage An issue we've not yet triaged labels Nov 11, 2016
@wilkinsona
Copy link
Member

@IndeedPlusPlus Thank you for the human translation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: invalid An issue that we don't feel is valid
Projects
None yet
Development

No branches or pull requests

4 participants