# Unicode category slug cause 404 error

**URL:** https://meta.discourse.org/t/unicode-category-slug-cause-404-error/190636
**Category:** Bug
**Created:** [May 17, 2021, 7:00am UTC](https://meta.discourse.org/t/unicode-category-slug-cause-404-error/190636 "2021-05-17T07:00:16Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![hawm](https://avatars.discourse-cdn.com/v4/letter/h/f07891/32.png) [@hawm](https://meta.discourse.org/u/hawm)
#### Post date: [May 17, 2021, 7:00am UTC](https://meta.discourse.org/t/unicode-category-slug-cause-404-error/190636/1 "2021-05-17T07:00:16Z")

</div>

It’s happening on my production instance and development instance.

## Reproduce step:

1. Change/create a category with Unicode slug
2. Try to edit the category setting
3. You got a 404 error

Return of `http://localhost:4200/c/测试/find_by_slug.json`:

```plaintext
{
"errors": [
"The requested URL or resource could not be found."
],
"error_type": "not_found",
"extras": {
"html": "<div class=\"page-not-found\">\n <h1 class=\"title\">Oops! That page doesn’t exist or is private.</h1>\n\n\n</div>\n\n\n\n<div class=\"row page-not-found-topics\">\n <div class=\"recent-topics\">\n <h2 class=\"recent-topics-title\">Recent</h2>\n <div class='not-found-topic'>\n <a href=\"/t/welcome-to-discourse/7\">Welcome to Discourse</a>\n </div>\n <a href=\"/latest\" class=\"btn btn-default\">More&hellip;</a>\n </div>\n</div>\n\n\n <div class=\"row\">\n <div class=\"page-not-found-search\">\n <h2>Search this site</h2>\n <p>\n <form action='/search' id='discourse-search'>\n <input type=\"text\" name=\"q\" value=\"\">\n <button class=\"btn btn-primary\">Search</button>\n </form>\n </p>\n </div>\n </div>\n\n <link rel=\"preload\" href=\"/assets/onpopstate-handler.js?1621234483.753622\" as=\"script\">\n<script src=\"/assets/onpopstate-handler.js?1621234483.753622\"></script>\n\n"
}
}

```

## Addition information:

- Setting `unicode usernames` is disable
- Keep happen even enable `unicode usernames`
- `allowed unicode username characters` = `\p{Han}`

---

<div class="post-metadata">

### Author: ![hawm](https://avatars.discourse-cdn.com/v4/letter/h/f07891/32.png) [@hawm](https://meta.discourse.org/u/hawm)
#### Post date: [May 18, 2021, 7:04pm UTC](https://meta.discourse.org/t/unicode-category-slug-cause-404-error/190636/2 "2021-05-18T19:04:12Z")

</div>

Change setting `slug generation method` to `encoded` fixed it, but I don’t really want an encoded slug for our topic URL
