修复 defaultLargeFileHandler 在Windows环境不支持中文 #720
Merged
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中了。