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 for Chinese characters #34
Comments
i have reproduced the problem,and found why does it happen. i will submit a PR to fix it soon.but i dont know if the author will accept it. |
if (isUnicode()) {
int length = 0;
fileName = "";
fileNameW = "";
while (length < fileNameBytes.length
&& fileNameBytes[length] != 0) {
length++;
}
byte[] name = new byte[length];
System.arraycopy(fileNameBytes, 0, name, 0, name.length);
fileName = new String(name);
if (length != nameSize) {
length++;
fileNameW = FileNameDecoder.decode(fileNameBytes, length);
}
} else {
fileName = new String(fileNameBytes);
fileNameW = "";
} I know when LHD_UNICODE is set.the filename consist of local coding name and unicode coding name. |
@sunny-shu beothorn is not maintaining the project, i am taking over. I am happy to have a look at your PR, we can also add a test file in the test scenarios to make sure it works fine. |
🎉 This issue has been resolved in version 7.2.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
junrar/src/main/java/com/github/junrar/Junrar.java
Line 159 in ae7bd9b
使用
fileHeader.getFileNameString()
获取FileName中文会乱码,而使用fileHeader.getFileNameW()
就不乱码
The text was updated successfully, but these errors were encountered: