RepoPilot

What unicode/non-Latin test cases are covered?

About sindresorhus/slugify · 2 messages · last activity 8/1/2026

Question

What unicode/non-Latin test cases are covered?

RepoPilot

The repository has comprehensive test coverage for non-Latin characters across multiple languages. Here are the covered test cases [test.js:L106-L145]:

German umlauts:

  • ä ö ü Ä Ö Ü ß → transliterates to ae oe ue Ae Oe Ue ss

Vietnamese:

  • ố Ừ Đ → transliterates to o U D

Arabic:

  • ث س و → transliterates to th s w

Persian / Farsi:

  • چ ی پ → transliterates to ch y p

Urdu:

  • ٹ ڈ ھ → transliterates to t d h

Pashto:

  • ګ ړ څ → transliterates to g r c

Russian:

  • Ж п ю → transliterates to Zh p yu

Romanian:

  • ș Ț → transliterates to s T

Turkish:

  • İ ı Ş ş Ç ç Ğ ğ → transliterates to I i S s C c G g

Additionally, the tests verify behavior with the transliterate: false option [test.js:L246-L258], where non-ASCII characters are preserved instead:

  • Déjà Vudéjà-vu (preserved)
  • Räksmörgåsräksmörgås (preserved)
  • 你好世界 (Chinese) → preserved as-is
  • مرحبا (Arabic) → preserved as-is

The README also mentions locale-specific transliteration [test.js:L211-L227], with Swedish and German locales producing different outputs for the same input.

FOLLOW_UPS:

  • How does the transliterate option affect performance?
  • What's the difference between locale-specific transliteration results?
  • Which languages are supported by the transliterate dependency?

Want to ask your own question?

Open chat for sindresorhus/slugify

Public Q&A. Generated by RepoPilot from the actual source of sindresorhus/slugify. AI answers can be incomplete or stale — verify before relying on them.