nuxt / content

The file-based CMS for your Nuxt application, powered by Markdown and Vue components.
https://content.nuxt.com
MIT License
3.06k stars 621 forks source link

bug(search): unicode characters display wrong on indexed mode #2728

Open HADB opened 1 month ago

HADB commented 1 month ago

Environment

-

Reproduction

  1. add some unicode content to playground/search/content
  2. run pnpm dev search to play the search playground
  3. type any words to search, check the search result in chrome dev tools network panel

Describe the bug

Unicode characters display wrong in chrome network panel because the Content-Type of headers is text/plain without setting charset in indexed mode.

According to 7.1 The Text Content-Type, default character set is US-ASCII if charset is absent which caused the problem.

Screenshots:

iShot_2024-07-25_15 39 44

It's better to set charset to utf-8.

Additional context

No response

Logs

No response

HADB commented 1 month ago

Hi, @farnabaz . I created a PR #2729 fixed this problem. Please take a look.