Chinese characters' url encoding for Japanese

Hello, it seems that the current behavior for encoding Kanji is that they get transliterated into Latin alphabet according to the Chinese pronunciation. For example, 雨四光 is turned into “yu-si-guang” when used as an anchor link.

Is there a way to change this behavior so that the URL makes more sense for Japanese?

We use https://crates.io/crates/slug for the slugification. If you know a crate that can configured per locale, I would gladly use it.

1 Like

From what I can see there aren’t any like that, and most seem to use the deunicode crate under the hood which is pretty much a simple 1 to 1 mapping. Anyways, I feel like it might be impossible to slugify Japanese properly.

I have since found that the “off” option for slugifying anchors works good enough, because it enables percent-encoding for the strings