forked from pterodactyl/wings
-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
[求助]检测是否为GBK,并判断是否要转换 #4
Comments
GBK的压缩包可以用于测试
UTF-8 的压缩包,可以使用面板上的压缩,再解压来进行测试 |
呃 测试用的 UTF8 压缩包结果也被转成 GBK 了,你有什么头绪吗 ![image](https://user-images.githubusercontent.com/17796830/194422198-c7ea6650-ef5e-469c-b652-8c4127ed6359.png) GBK 压缩包测试结果倒是正常的.
|
在新版中,检测到的文件名是乱码的,并且无法正常工作
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/pterodactyl-china/wings/blob/gbkconvert/server/filesystem/compress.go
wings/server/filesystem/compress.go
Lines 233 to 238 in 48eaf03
判断为true时会将 GBK 转换为 UTF-8,false则直接输出不进行转换。
编译没问题
wings/server/filesystem/compress.go
Line 237 in 48eaf03
在237行我想直接输出 179行的
str
wings/server/filesystem/compress.go
Line 179 in 48eaf03
但在测试中,true时转换成功并解压文件,false时直接无响应(卡进程)。
对应的wings测试版本
https://github.com/vlssu/wings/actions/runs/3195622098
如果有更好的思路,可以在源代码的基础上重新编写修复。 https://github.com/pterodactyl-china/wings/blob/develop/server/filesystem/compress.go
The text was updated successfully, but these errors were encountered: