修复 defaultLargeFileHandler 在Windows环境不支持中文#720
Merged
ithewei merged 1 commit intoithewei:masterfrom Apr 17, 2025
Merged
Conversation
add hv::utf8_to_ansi and hv::ansi_to_utf8 function to hstring.h
ithewei
reviewed
Apr 16, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
在 hstring.h 中添加 hv::utf8_to_ansi 和 hv::ansi_to_utf8 函数
因为这个内部的大文件处理是采用的HFile封装的标准库ANSI函数处理,而通常只有Windows环境的ANSI不是UTF8编码,所以为了改动幅度最小化并且避免引入iconv外部第三方编码转换库只好借助内置的窄宽字符转换先将浏览器请求的UTF8字符串转换到宽字符,在从宽字符转换到对应本地化编码的ANSI,虽然存在两次转换但大文件传输并不高频触发且系统内置编码转换效率极高影响不大,也为了方便后续Windows环境有这方面转换需要都整合到hstring.h中了。