Skip to content

修复 defaultLargeFileHandler 在Windows环境不支持中文 #720

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

Merged
merged 1 commit into from
Apr 17, 2025

Conversation

House-Men
Copy link
Contributor

在 hstring.h 中添加 hv::utf8_to_ansi 和 hv::ansi_to_utf8 函数

因为这个内部的大文件处理是采用的HFile封装的标准库ANSI函数处理,而通常只有Windows环境的ANSI不是UTF8编码,所以为了改动幅度最小化并且避免引入iconv外部第三方编码转换库只好借助内置的窄宽字符转换先将浏览器请求的UTF8字符串转换到宽字符,在从宽字符转换到对应本地化编码的ANSI,虽然存在两次转换但大文件传输并不高频触发且系统内置编码转换效率极高影响不大,也为了方便后续Windows环境有这方面转换需要都整合到hstring.h中了。

add hv::utf8_to_ansi and hv::ansi_to_utf8 function to hstring.h
@ithewei ithewei merged commit ba162bd into ithewei:master Apr 17, 2025
6 checks passed
@House-Men House-Men deleted the patch-5 branch April 17, 2025 12:03
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.

2 participants