Bug report
Environment
- Next.js: 16.1.6
- Template: next-wp
- WordPress REST API
- Language: Persian (UTF-8 slugs)
Description
I'm experiencing an issue when using Persian slugs from WordPress.
The generated links look correct and point to:
/posts/اینترنت-باز-شد-الملل-وصل-شد
However, when I click the link from the post list, Next.js returns a 404 page.
The strange part is that if I remove the slug from the browser address bar and paste the exact same slug again (without changing any characters), the page loads successfully and the post is fetched correctly from WordPress.
So:
- Clicking the generated
<Link> → 404
- Re-entering the exact same URL manually → Works
What I have already tried
trim()
- Removing zero-width characters (
\u200B-\u200D, \uFEFF)
dynamicParams = true
generateStaticParams()
- Normalizing the slug before requesting WordPress
None of these solved the issue.
Expected behavior
Client-side navigation should work correctly for Unicode/Persian slugs exactly as it does for ASCII slugs.
Question
Has anyone experienced this issue with Unicode slugs?
Could this be related to URL encoding, Unicode normalization (NFC/NFD), or Next.js App Router handling of non-Latin route parameters?
English slugs work correctly. The problem only happens with Persian (Unicode) slugs
posts/absx
Bug report
Environment
Description
I'm experiencing an issue when using Persian slugs from WordPress.
The generated links look correct and point to:
However, when I click the link from the post list, Next.js returns a 404 page.
The strange part is that if I remove the slug from the browser address bar and paste the exact same slug again (without changing any characters), the page loads successfully and the post is fetched correctly from WordPress.
So:
<Link>→ 404What I have already tried
trim()\u200B-\u200D,\uFEFF)dynamicParams = truegenerateStaticParams()None of these solved the issue.
Expected behavior
Client-side navigation should work correctly for Unicode/Persian slugs exactly as it does for ASCII slugs.
Question
Has anyone experienced this issue with Unicode slugs?
Could this be related to URL encoding, Unicode normalization (NFC/NFD), or Next.js App Router handling of non-Latin route parameters?
English slugs work correctly. The problem only happens with Persian (Unicode) slugs
posts/absx