[GH-ISSUE #105] 直接在chrome上浏览文本文件,中文显示乱码 #46

Closed
opened 2026-04-08 16:50:02 +03:00 by zhus · 1 comment
Owner

Originally created by @aeiouaoeiuv on GitHub (Jul 15, 2022).
Original GitHub issue: https://github.com/sigoden/dufs/issues/105

Problem

  • 创建F:\测试文件.txt,并往里面填入中文,保存为utf8格式
  • win10的cmd运行:.\dufs.exe -p 80 F:\测试文件.txt
  • Chrome的地址栏输入:127.0.0.1即可显示测试文件.txt的内容,但是中文部分是乱码。

乱码如下截图
image

测试文件.txt文件内容为:

中文字体
english

如果将测试文件.txt另存为带有BOM的UTF-8,则Chrome上显示正常。

Environment:

  • Dufs version: 0.26.0
  • Browser/Webdav Info: Chrome 103.0.5060.114
  • OS Info: Windows 10
Originally created by @aeiouaoeiuv on GitHub (Jul 15, 2022). Original GitHub issue: https://github.com/sigoden/dufs/issues/105 **Problem** * 创建`F:\测试文件.txt`,并往里面填入中文,保存为`utf8`格式 * win10的cmd运行:`.\dufs.exe -p 80 F:\测试文件.txt` * Chrome的地址栏输入:`127.0.0.1`即可显示`测试文件.txt`的内容,但是中文部分是乱码。 乱码如下截图 ![image](https://user-images.githubusercontent.com/18081173/179142556-9b243ffb-0414-4e68-8720-23ccaff32793.png) `测试文件.txt`文件内容为: ``` 中文字体 english ``` 如果将`测试文件.txt`另存为`带有BOM的UTF-8`,则Chrome上显示正常。 **Environment:** - Dufs version: 0.26.0 - Browser/Webdav Info: Chrome 103.0.5060.114 - OS Info: Windows 10
zhus closed this issue 2026-04-08 16:50:02 +03:00
Author
Owner

@sigoden commented on GitHub (Jul 15, 2022):

这是浏览器的默认行为,dufs 没什么可以改进的。

<!-- gh-comment-id:1185148910 --> @sigoden commented on GitHub (Jul 15, 2022): 这是浏览器的默认行为,dufs 没什么可以改进的。
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sigoden/dufs#46