Home
Sign Up
Sign In
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
V2EX
›
程序员
go 的 http.ServeFile 就只支持 utf-8/utf-16be/utf-16le?怎么把 gb2312 编码的文件返回?
darknoll
·
Dec 21, 2020
· 2132 views
This topic created in 2158 days ago, the information mentioned may be changed or developed.
还得自己改下源码编译?
GB2312
utf-16be
servefile
utf-16le
2 replies
•
2020-12-21 18:37:52 +08:00
ysc3839
Dec 21, 2020 via Android
1
调用 ServeFile 之前用 w.Header()["Content-Type"] 自己设置一下编码?
dongya
Dec 21, 2020
2
https://github.com/axgle/mahonia
用这个转一下试试
About
·
Help
·
Advertise
·
Blog
·
API
·
FAQ
·
Privacy
·
Solana
·
922 Online
Highest 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 23ms ·
UTC 21:34
·
PVG 05:34
·
LAX 13:34
·
JFK 16:34
♥ Do have faith in what you're doing.
❯