You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-python/unidecode/metadata.xml

21 lines
1.6 KiB

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer>
<email>sochotnicky@gentoo.org</email>
<name>Stanislav Ochotnicky</name>
</maintainer>
<longdescription lang="en">
This is a Python port of Text::Unidecode Perl module
It often happens that you have text data in Unicode, but you need to represent it in ASCII. For example when integrating with legacy code that doesn't support Unicode, or for ease of entry of non-Roman names on a US keyboard, or when constructing ASCII machine identifiers from human-readable Unicode strings that should still be somewhat intelligeble (a popular example of this is when making an URL slug from an article title).
In most of these examples you could represent Unicode characters as "???" or "\15BA\15A0\1610", to mention two extreme cases. But that's nearly useless to someone who actually wants to read what the text says.
What Unidecode provides is a middle road: function unidecode() takes Unicode data and tries to represent it in ASCII characters (i.e., the universally displayable characters between 0x00 and 0x7F), where the compromises taken when mapping between two character sets are chosen to be near what a human with a US keyboard would choose.
Note that this module generally produces better results than simply stripping accents from characters (which can be done in Python with built-in functions). It is based on hand-tuned character mappings that for example also contain ASCII approximations for symbols and non-Latin alphabets.
</longdescription>
</pkgmetadata>