@nuxt/content: 1.5.0
nuxt: 2.14.0
https://codesandbox.io/s/nuxtcontent-demo-qlh6z?file=/content/index.md
Nuxt Content should fetch and display the file 'frågor'.
It tries to fetch 'fr%25C3%25A5gor' which results in a 404.
I noticed this issue on my production site were it can't prefetch pages with those characters, but it can display them. When I created the reproduction link, it wont even display the page with special characters, just a 404 error.
Are you running on a Mac or Linux, or on Windows?
On Linux/macOS it might work, because they actually are unicode for file names. But URLs aren’t 1:1 UNIX file system. Windows not sure.
Your issue boils down to one of the oldest IETF http design decision about unicode in an URL (link to similar StackOverflow question)
I write in french, I’m not native English myself (and so are Nuxt.js’ authors), it is common practice to name files on filesystem without spaces or anything that becomes URL encoded. Spaces, caractères accentués, emojis. At least content supports a title YAML front matter, so your title can be written correctly.
Also, don’t forget to add lang=fr-CA (your own), because screen reader and CSS will behave differently (W3C lang tag, w.r.t. CSS and Intl). I can give more info about Internationalization, but I went overboard already =)
I am on Windows. So this is may not really be a Nuxt or Nuxt Content issue, more of a systems issue.
That's good, thanks for taking your time and answering! :)
Most helpful comment
Are you running on a Mac or Linux, or on Windows?
On Linux/macOS it might work, because they actually are unicode for file names. But URLs aren’t 1:1 UNIX file system. Windows not sure.
Your issue boils down to one of the oldest IETF http design decision about unicode in an URL (link to similar StackOverflow question)
I write in french, I’m not native English myself (and so are Nuxt.js’ authors), it is common practice to name files on filesystem without spaces or anything that becomes URL encoded. Spaces, caractères accentués, emojis. At least content supports a title YAML front matter, so your title can be written correctly.
Also, don’t forget to add lang=fr-CA (your own), because screen reader and CSS will behave differently (W3C lang tag, w.r.t. CSS and Intl). I can give more info about Internationalization, but I went overboard already =)