mirror of
https://github.com/sigoden/dufs.git
synced 2026-04-08 16:49:02 +03:00
[GH-ISSUE #185] Encoding issues in plain text files #88
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @physanus on GitHub (Feb 27, 2023).
Original GitHub issue: https://github.com/sigoden/dufs/issues/185
Problem
When creating a new UTF-8 encoded file with the content
äöüßand browsing it via dufs, the browser showsäöüß. On the command line, everything is normal.When I manually set the page encoding on the client side to UTF-8, everything is normal again. However, I couldn't figure out how to do this server sided.
Log
n/a
Environment:
sigoden/dufs:v0.32.0sigoden/dufs:v0.30.0Both via an nginx reverse proxy
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/110.0Ubuntu 22.10 (Kinetic Kudu)/22.04.2 LTS (Jammy Jellyfish)Windows 11 Pro - 22H2/Android@sigoden commented on GitHub (Feb 27, 2023):
dufs just returns the content as-is.
There is no way to accurately detect encoding of a text file.
dufs can't do anything about it.
@physanus commented on GitHub (Feb 27, 2023):
Totally correct. I added this to my nginx configuration in the server-block:
Works as expected now. Thank you!