Re: [Tutor] unicode ordinals to/from utf8

2009-12-26 Thread Kent Johnson
On Sat, Dec 26, 2009 at 10:41 AM, spir wrote: > OK, I'll answer myself ;-) > Found needed information at http://www1.tip.nl/~t876506/utf8tbl.html > See below new version, I'm not at all sure what you are trying to do here. Is it more than conversion between unicode and utf-8? It looks like you ha

Re: [Tutor] unicode ordinals to/from utf8

2009-12-26 Thread spir
OK, I'll answer myself ;-) Found needed information at http://www1.tip.nl/~t876506/utf8tbl.html See below new version, Denis la vita e estrany http://spir.wikidot.com/ = # coding: utf8 import sys ; end = sys.exit # constant max_co

[Tutor] unicode ordinals to/from utf8

2009-12-25 Thread spir
Special offer for coders coding on Christmas day! I'm looking for the simplest way to decode/encode unicode ordinals (called 'codes' below) to/from utf8. Find this rather tricky, esp because of variable number of meaningful bits in first octet. Specifically, for encoding, is there a way to avoi