Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

for support better text decode #140

Open
bk1412 opened this issue May 8, 2024 · 1 comment
Open

for support better text decode #140

bk1412 opened this issue May 8, 2024 · 1 comment

Comments

@bk1412
Copy link

bk1412 commented May 8, 2024

Expected Behavior

noraml decode html text,even respon header "Content-Type" not set "charset=utf-8"

Current Behavior

without english page,some other language maybe have text decode problem

Possible Solution

src/uv.sw.js
line 241-242 to add:

if (responseCtx.headers["content-type"].includes("text/html")) {
	responseCtx.headers["content-type"] = "text/html;charset=utf-8";
}
@proudparrot2
Copy link
Contributor

You should open a pull request for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants