[issue2857] Add "java modified utf-8" codec

2012-04-24 Thread Martin v . Löwis
Martin v. Löwis added the comment: Ok, I'm closing this entire issue as "won't fix", then. There apparently is a need for functionality like this, but there is apparently also a concern that this is too specialized for the standard library. As it is possible to implement this as a stand-alone

[issue2857] Add "java modified utf-8" codec

2012-04-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Serhiy: your functions to not constitute a Python codec. For example, there > is no support for error handlers in them. Yes, it is not a codec in Python library terminology. It's just a pair of functions, the COder and DECoder, which is enough for the task

[issue2857] Add "java modified utf-8" codec

2012-04-24 Thread Martin v . Löwis
Martin v. Löwis added the comment: Serhiy: your functions to not constitute a Python codec. For example, there is no support for error handlers in them. -- nosy: +loewis ___ Python tracker

[issue2857] Add "java modified utf-8" codec

2012-04-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: As far as I understand, this codec can be implemented in Python. There is no need to modify the interpreter core. def decode_cesu8(b): return re.sub('[\uD800-\uDBFF][\uDC00\DFFF]', lambda m: chr(0x1 | ((ord(m.group()[0]) & 0x3FF) << 10) | (ord(m.gro

[issue2857] Add "java modified utf-8" codec

2011-08-13 Thread STINNER Victor
STINNER Victor added the comment: > Python does have other "weird" encodings like bz2 or rot13. No, it has no more such weird encodings. -- ___ Python tracker ___ __

[issue2857] Add "java modified utf-8" codec

2011-08-12 Thread Adal Chiriliuc
Adal Chiriliuc added the comment: Python does have other "weird" encodings like bz2 or rot13. Beside, batteries included :) -- ___ Python tracker ___ ___

[issue2857] Add "java modified utf-8" codec

2011-08-12 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Marc-Andre Lemburg wrote: > > Corrected the title again. See my comment. Please open a new ticket, if you want to add a CESU-8 codec. Looking at the relevant use cases, I'm at most +0 on adding the modified UTF-8 codec. I think such codecs can well live o

[issue2857] Add "java modified utf-8" codec

2011-08-12 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Corrected the title again. See my comment. -- title: Add CESU-8 codec ("java modified utf-8") -> Add "java modified utf-8" codec versions: +Python 3.3 -Python 2.7, Python 3.2 ___ Python tracker