mirror of
https://github.com/sigoden/dufs.git
synced 2026-04-08 16:49:02 +03:00
[PR #186] [MERGED] feat: guess plain text encoding then set content-type charset #508
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?
📋 Pull Request Information
Original PR: https://github.com/sigoden/dufs/pull/186
Author: @sigoden
Created: 2/27/2023
Status: ✅ Merged
Merged: 3/1/2023
Merged by: @sigoden
Base:
main← Head:feat-guess-encoding📝 Commits (1)
331c7c0feat: guess plain text encoding then set content-type charset📊 Changes
5 files changed (+111 additions, -18 deletions)
View changed files
📝
Cargo.lock(+12 -0)📝
Cargo.toml(+1 -0)📝
src/server.rs(+35 -8)📝
tests/fixtures.rs(+25 -8)📝
tests/http.rs(+38 -2)📄 Description
Both issue #185 and issue #105 are related to encoding.
Although it is not 100% accurate to know the encoding of a text file.
A guess encoding is correct most of the timeis. It's better than just displaying garbled characters.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.