Text::...acritic(3pm)
π NAME π
Text::Undiacritic β bestie, it literally just removes diacritics from a string. That's the whole vibe. No cap. β¨
This page lives in the manual as Text::...acritic(3pm), iykyk. π
πΈ VERSION πΈ
This doc is describing Text::Undiacritic 0.01. Yes, 0.01. Baby module. Main character origin story. π
β¨ SYNOPSIS β¨
use Text::Undiacritic qw(undiacritic);
$ascii_string = undiacritic( $czech_string );
That's it. That's the whole thing. Two lines and you're slaying. π
π¦ DESCRIPTION π¦
So here's the tea: it takes characters that have diacritics and turns them into their base characters. Simple, clean, iconic.
But wait, there's more π β it also converts things into their base character in the cases where UNICODE straight up does not give you a decomposition. UNICODE really said "no β¨ for you" and this module said "bet, I'll handle it myself."
E.g. all those characters '... WITH STROKE' like 'LATIN SMALL LETTER L WITH STROKE' have no decomposition at all. In that case the result will be 'LATIN SMALL LETTER L'. So your strokey little L just becomes a regular L. Lowkey beautiful. π₯Ή
And why do you even care? Because removing diacritics is useful for matching text independent of spelling variants. Fr fr. Search that doesn't ghost you just because someone typed a Δ instead of a c. π
π SUBROUTINES/METHODS π
undiacritic
$ascii_string = undiacritic( $characters );
Removes diacritics from $characters and hands you back a simplified character string. Glow-up complete. π
Heads up bestie: the input string must be in character modus, i.e. UNICODE code points. Give it bytes and it's giving chaos, not results. π
π©Ί DIAGNOSTICS π©Ί
Nothing here. Empty. A whole section with zero content. It's giving "we left the group chat on read." π
βοΈ CONFIGURATION AND ENVIRONMENT βοΈ
Also empty. No config, no env vars, no nothing. The module is self-sufficient. Independent queen. π
π§ DEPENDENCIES π§
It needs its little friends:
versioncharnamesUnicode::Normalize
Squad goals. π«Ά
π« INCOMPATIBILITIES π«
Nothing listed. Zero beef. Peace and love. βοΈπΈ
β οΈ BUGS AND LIMITATIONS β οΈ
There is no experience if this module gives useful results for scripts other than Latin. That's it. That's the limitation. Latin only, bestie β don't roll up with your other scripts expecting miracles. π
π AUTHOR π
Helmut Wollmersdorfer "<WOLLMERS@cpan.org>" β the icon who wrote this. Shoutout. π£
π LICENSE AND COPYRIGHT π
Copyright (c) 2007, Helmut Wollmersdorfer "<WOLLMERS@cpan.org>". All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. So go wild, legally. π
Okay and for the cute sign-off: this whole thing is perl v5.36.0 flavored, dated 2023-02-05, and it lives in the manual as Text::...acritic(3pm). Bye bestie, go undiacritic something gorgeous. π
β¨π
π¦ where this page comes from
- debian bookworm: libtext-undiacritic-perl 0.07-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libtext-undiacritic-perl 0.07-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libtext-undiacritic-perl 0.07-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libtext-undiacritic-perl 0.07-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libtext-undiacritic-perl 0.07-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms