Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Libraries

    translit 0.2 Alpha 1

    Download button

    No screenshots available
    Downloads: 128  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    spirit | More programs
    LGPL v3 / FREE
    June 13th, 2012, 19:35 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    translit description

    Transliterate between Unicode and smaller coded character sets

    translit is a Python module to transliterate between Unicode and smaller coded character sets.

    Example usage

    >>> import translit
    >>> text = "La question, c’est\u202f: «\u202fOù est le cœur\u202f?\u202f»"

    Downgrade text to Latin-1:

    >>> translit.downgrade(text, "latin-1")
    "La question, c'est\xa0: «\xa0Où est le coeur\xa0?\xa0»"

    Downgrade text to ASCII:

    >>> translit.downgrade(text, "ascii")
    'La question, c\'est : "Ou est le coeur ?"'


    Downgrade and encode to Latin-1:

    >>> buf = text.encode("latin-1/translit")
    >>> buf
    b"La question, c'est\xa0: \xab\xa0O\xf9 est le coeur\xa0?\xa0\xbb"


    Decoding, the normal way:

    >>> buf.decode("latin-1")
    "La question, c'est\xa0: \xab\xa0O\xf9 est le coeur\xa0?\xa0\xbb"


    Decoding, the upgraded way:

    >>> buf.decode("latin-1/translit/fr")
    'La question, c’est\u202f: «\u202fOù est le cœur\u202f?\u202f»'



    Product's homepage

    Requirements:

    · Python
    · pyenchant

      


    TAGS:

    Unicode transliteration | Python library | Python | Unicode | transliteration

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM