# Tags does not work with Cyrillic

**URL:** https://meta.discourse.org/t/tags-does-not-work-with-cyrillic/67217
**Category:** Bug
**Created:** [August 1, 2017, 5:29am UTC](https://meta.discourse.org/t/tags-does-not-work-with-cyrillic/67217 "2017-08-01T05:29:41Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![mpalmer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mpalmer/32/45740_2.png) [@mpalmer](https://meta.discourse.org/u/mpalmer)
#### Post date: [August 1, 2017, 6:29am UTC](https://meta.discourse.org/t/tags-does-not-work-with-cyrillic/67217/2 "2017-08-01T06:29:10Z")

</div>

Ooooooh, this is going to get messy.

In theory, URLs can only contain 7-bit ASCII characters. In practice, everyone’s pretty much decided that percent-encoded UTF-8 is 👌, which is why, if you look in the “env” for the log message, you’ll see something like

```
REQUEST_URI /tags/%D0%B7%D0%B5%D0%BC%D0%BB%D1%8F/notifications

```

(Which is the UTF-8 encoding for “земля”)

So, the problem is occuring because the contents of `params` is being encoded as `ASCII-8BIT`, and while _most_ everything manages to figure out what’s going on and roll with it, the JSON encoding of the result, containing as it does an ASCII-8BIT string whose individual bytes don’t translate into valid UTF-8 codepoints, explodes.

Luckily, the fix is relatively straightforward:

[https://github.com/discourse/discourse/commit/7ee861f4571f6e7259e631d0404e0d958501dcf0](https://github.com/discourse/discourse/commit/7ee861f4571f6e7259e631d0404e0d958501dcf0)

---

_[View the full topic](https://meta.discourse.org/t/tags-does-not-work-with-cyrillic/67217)._
