Coder Social home page Coder Social logo

rtfunicode's Introduction

Unicode to RTF command code conversion

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
>>> '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.

Requirements

  • Python 3.3-3.8

Development

https://travis-ci.org/mjpieters/rtfunicode.svg?branch=master

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

License

BSD (simplified), see: LICENSE.txt

Author

Martijn Pieters <[email protected]>

rtfunicode's People

Contributors

mjpieters avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

rtfunicode's Issues

PyPi pip install fails

(cpython27) benjolitz-laptop:~/software $ pip install rtfunicode
Collecting rtfunicode
  Using cached rtfunicode-1.3.zip
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/y3/ddl3hd9j6d54fv2kd5x804lc0000gp/T/pip-build-pWQk9Q/rtfunicode/setup.py", line 11, in <module>
        open('CHANGES.rst').read(),
    IOError: [Errno 2] No such file or directory: 'CHANGES.rst'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/y3/ddl3hd9j6d54fv2kd5x804lc0000gp/T/pip-build-pWQk9Q/rtfunicode/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.