Encoder for unicode to RTF 1.5 command sequences
This module 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.
- Python 3.3-3.8
The project code is hosted on GitHub, feel free to report issues, fork the code and issue pull requests.
BSD (simplified), see: LICENSE.txt
- Removed Python 2 compatibility.
- Add a MANIFEST.in template to make sure CHANGES.rst is included in the distribution.
- Removed limitations section from README as these were removed in 1.1.
- Correct LICENSE.txt file.
- Support surrogate pairs by using math text-run groups.
- Drop support for Python 3.1 and 3.2; 3.3 - 3.5 are now officially supported.
- Initial release.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size rtfunicode-2.0-py3-none-any.whl (4.2 kB)||File type Wheel||Python version py3||Upload date||Hashes View|
|Filename, size rtfunicode-2.0.tar.gz (3.6 kB)||File type Source||Python version None||Upload date||Hashes View|