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

support of encoding setting/detecting for text file #279

Open
ChetWang opened this issue Dec 10, 2019 · 1 comment
Open

support of encoding setting/detecting for text file #279

ChetWang opened this issue Dec 10, 2019 · 1 comment

Comments

@ChetWang
Copy link

Some jars have text config files, such as xml/yml/properties/json files. jd-gui use system encoding while opening those files. But some times, another chaset is needed. For example, most jars are compiled、packaged with charset 'UTF-8', but user system encoding may be another charset, it is very common for Asian users.

@liudonghua123
Copy link

liudonghua123 commented Mar 9, 2022

I set an environment variable JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8 to overwrite the default system encoding like gbk or others.

You could also pass the option in java command when execute the jar. For example, java -Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8 -jar /path/to/jd-gui-1.6.6.jar /optional/path/to/jar/or/class.

see https://stackoverflow.com/questions/361975/setting-the-default-java-character-encoding.

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

No branches or pull requests

2 participants