RotUnicode (GitHub) is a converting library for conversions of a string from and to between ASCII and Unicode with readability somewhat still in character, so to speak.
Its name provides a good indication what it does, nevertheless an explanation:
RotUnicode stands for rotate-to-unicode. Or rotten-unicode for those who have nightmares about Unicode. It was inspired by Rot13.
For example, from README:
>>> import codecs >>> from box.util.rotunicode import RotUnicode >>> codecs.register(RotUnicode.search_function) >>> print('Hello World!'.encode('rotunicode')) Ĥȅľľő Ŵőŕľď! >>> 'Ĥȅľľő Ŵőŕľď!'.decode('rotunicode') Hello World!
You can still read it as a human, even it’s now using a completely different set of characters representing “Hello World!” As a human, you could recognize the words, it’s amazing how our brain works.
I don’t know what’s the real purpose of developing this library, what it would be used for practical tasks. I truly has no clue.
RotUnicode is written by Box Inc for Python 2 only, under the Apache License Version 2.0, currently version 1.0.2 (2014-04-04).
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.