Softpedia
 


LINUX CATEGORIES:



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

    rtfunicode 1.0

    Download button

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

    License / Price:

    Last Updated:

    Category:
    Martijn Pieterse | More programs
    BSD License / FREE
    June 6th, 2012, 13:43 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    rtfunicode description

    Encoder for unicode to RTF 1.5 command sequences

    rtfunicode is a Python module that implements an encoder for unicode to RTF 1.5 command sequences; it can be used to generate valid RTF output with international characters.

    Importing this module adds a new rtfunicode codec, allowing you to encode unicode strings to valid RTF bytecode sequences:

    >>> import rtfunicode
    >>> u'RTF and unicode mix just fine! \u263A'.encode('rtfunicode')
    'RTF and unicode mix just fine! \\u9786?'


    The RTF command code for a unicode character is uN?, where N is a signed 16-bit integer and the ? is a placeholder character for older RTF readers. This module sets the latter to the '?' literal for simlicity's sake.

    Development

    The project code is hosted on GitHub, feel free to report issues, fork the code and issue pull requests.


    Product's homepage

    Requirements:

    · Python

    Limitations:

    · This encoder does not support officially unicode outside the BMP (codepoints u0000-uffff). If you do pass in codepoints beyond this point, behaviour depends on wether or not you have a python interpreter compiled with UCS-2 or UCS-4; the former will translate such codepoints using a surragate pair in platform-dependent ordering, but with UCS-4, encoding using 'strict' will raise a UnicodeEncodeError exception.

    · In any case, the RTF standard does not specify how codepoints outside the BMP should be handled.

      


    TAGS:

    Unicode converter | Python library | RTF converter | Python | RTF | Unicode

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

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