Utf9: python library for this u̶s̶e̶l̶e̶s̶s̶ 𝘣𝘦𝘢𝘶𝘵𝘪𝘧𝘶𝘭 encoding
1–4 of 4 posts
Re: Utf9: python library for this u̶s̶e̶l̶e̶s̶s̶ 𝘣𝘦𝘢𝘶𝘵𝘪𝘧𝘶𝘭 encoding
#2With a little bit more work, you could have something you could pass to codecs.register()¹, so that you could encode and decode in the standard way:
text = u'ႹЄLᒪo, ǃ'
enc = text.encode('utf-9')
dec = enc.decode('utf-9')
assert text == dec
¹: https://docs.python.org/2.7/library/codecs.html#codecs.regis...Re: Utf9: python library for this u̶s̶e̶l̶e̶s̶s̶ 𝘣𝘦𝘢𝘶𝘵𝘪𝘧𝘶𝘭 encoding
#3With a little bit more work, you could have something you could pass to codecs.register()¹, so that you could encode and decode in the standard way: text = u'ႹЄLᒪo, ǃ' enc = text.encode('utf-9') dec = enc.decode('utf-9') assert text == dec ¹: https://docs.python.org/2.7/library/codecs.html#codecs.regis...
Apparently HN eats emoji. Ah, well.
Re: Utf9: python library for this u̶s̶e̶l̶e̶s̶s̶ 𝘣𝘦𝘢𝘶𝘵𝘪𝘧𝘶𝘭 encoding
#4With a little bit more work, you could have something you could pass to codecs.register()¹, so that you could encode and decode in the standard way: text = u'ႹЄLᒪo, ǃ' enc = text.encode('utf-9') dec = enc.decode('utf-9') assert text == dec ¹: https://docs.python.org/2.7/library/codecs.html#codecs.regis...
Nice idea, I will try to implement it ;) I will probably have to pay attention to the final call for the IncrementalEncoder. In fact I let bitarray to add 0's at the end of the encoded data to comply with these pesky 8 bit architecture ;)