Python Forum

Full Version: things i am working on
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
posted in the bar because this is the place for stuff nobody cares about.

stuff i am working on today, and probably this week:

0. a function to encode escape sequences: esencode(chr(13)+chr(10)) -> '\\r\\n'

1. a function to decode escape sequences: esdecode('\\r^J') -> '\r\n'

2. a function to convert Unicode characters/values to UTF-8.

3. a function to convert UTF-8, MUTF-8 and XUTF-8 code sequences to the represented code point values.

yeah, yeah, i know Python3 has the UTF-8 conversion available both ways. but my functions are more flexible (support more types and numeric values) and more extensive (includes MUTF-8 and XUTF-8). one advantage is that this, being coded in Python, gives you the opportunity to modify it. and all of these are being coded to work in both Python3 (at least 3.5.2) and Python2 (at least 2.7.12) .