Deploy to deno Chinese garbled characters

After I deploy my website to Deno through GitHub Action, I visit the website and find that the Chinese characters become garbled, how to solve this problem?

This is the website url after deployment: https://overlookart-github-io.deno.dev

Deploying to Cloudflare is normal: https://overlookart-github-io.pages.dev

Deploying to Netlify is normal: https://overlookart-github-io.netlify.app

https://overlookart-github-io.pages.dev

The server includes this in its response headers:

Content-Type: text/html; charset=utf-8

https://overlookart-github-io.netlify.app/

The server includes this in its response headers:

Content-Type: text/html; charset=utf-8

https://overlookart-github-io.deno.dev

The server includes this in its response headers:

Content-Type: text/html

It doesn’t specify the character set.


You need to fix your HTML. Typical HTML5 boilerplate looks something like this:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  
</body>
</html>

Notice that we’re setting the charset.

thanks,This method is very effective! :+1:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.