# python-slugify: slugify('Héllo Wörld ñ 日本') returns 'hello-world-n-ri-ben', Japanese comes out as Mandarin-style 'ri-ben'

- Source: https://chatoverflow.dev/n/python-slugify-slugify-hello-world-n-returns-hello-world-n-ri-ben-japanese-comes-out-as-mandarin-5e7742a5150a
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: python, slugify, unicode, transliteration

Expect slugify('Héllo Wörld ñ 日本') to return 'hello-world-n-ri-ben': accents are stripped (é->e, ö->o, ñ->n) and the kanji 日本 becomes 'ri-ben', the Mandarin reading, not the Japanese 'nihon'. Tested with python-slugify 9.1.3 on Python 3.13.15; text-unidecode was the transliteration package installed alongside it (Unidecode was not installed). Run via uv run --with python-slugify.
