Earlier quoted context omitted.
Fredrik Lundh describes a DIY patch on top of unicodedata here: http://effbot.org/zone/unicode-convert.htm It solves the ä->ae problem and its ilk for Western European languages. Time has devoured my comment on that post, which extended the transliteration table to Eastern European languages and proposed to use mnemonic names like int(u'\N{Latin capital letter AE}') instead of 0xc6.
ä -> ae is a German transliteration that would not be recognized by a non-German (e.g. a Dutchman).
Projecting Unicode to ASCII
31–40 of 42 posts
Re: Projecting Unicode to ASCII
#32I use this transform chain for asciifying filenames (ridiculous as it is, in 2019 we still can't sync unicode filenames between different OSs): uconv -x ':: Any-Latin; :: Latin-ASCII; [:^ASCII:] > \_' Explanation: Any-Latin Transliterates from non-latin scripts to latin script (e.g. "γραφὴν" --> "graphḕn"). Latin-ASCII Tries to asciify characters as much as possible by discarding accents, splitting ligatures, replaci…
Why not transform them into utf-8, say with iconv?
Re: Projecting Unicode to ASCII
#33Re: Projecting Unicode to ASCII
#34I use this transform chain for asciifying filenames (ridiculous as it is, in 2019 we still can't sync unicode filenames between different OSs): uconv -x ':: Any-Latin; :: Latin-ASCII; [:^ASCII:] > \_' Explanation: Any-Latin Transliterates from non-latin scripts to latin script (e.g. "γραφὴν" --> "graphḕn"). Latin-ASCII Tries to asciify characters as much as possible by discarding accents, splitting ligatures, replaci…
Re: Projecting Unicode to ASCII
#35https://github.com/pudo/normality/blob/master/normality/tran...
Re: Projecting Unicode to ASCII
#36For Perl, https://metacpan.org/pod/Text::Unidecode has never let me down so far.
Re: Projecting Unicode to ASCII
#37That really is a problem of the search engine. Poincaré should be normalized and stemmed before being indexed and queried. (You don't say projected). Wonder which engine failed to do that.
TFA is the author of the "search engine" describing how they learned about having to do normalization.
Re: Projecting Unicode to ASCII
#38iconv is the standard utility for this (a standard unix/linux utility) and includes the projection of characters that aren't in the target character set. Not sure how well it handles CJKV chars though.
$ echo 北亰 | iconv -t ASCII//TRANSLIT
??Re: Projecting Unicode to ASCII
#39I use this transform chain for asciifying filenames (ridiculous as it is, in 2019 we still can't sync unicode filenames between different OSs): uconv -x ':: Any-Latin; :: Latin-ASCII; [:^ASCII:] > \_' Explanation: Any-Latin Transliterates from non-latin scripts to latin script (e.g. "γραφὴν" --> "graphḕn"). Latin-ASCII Tries to asciify characters as much as possible by discarding accents, splitting ligatures, replaci…
What does "::" mean?
>Each transform rule consists of two colons followed by a transform name.
http://userguide.icu-project.org/transforms/general#TOC-Comp...
Re: Projecting Unicode to ASCII
#40Earlier quoted context omitted.
ä -> ae is a German transliteration that would not be recognized by a non-German (e.g. a Dutchman).
While a similar transliteration (ø-> oe) would be understood by Danes, it can create misunderstandings: køn (pretty) != koen (the cow), søn (son) != soen (the sow), røde (red) != roede (rowed), tør (dry) != toer (a two) and rør (pipe) != roer (rower).