[issue3649] IA5 Encoding should be in the default encodings

2008-08-25 Thread Pascal Bach
Pascal Bach <[EMAIL PROTECTED]> added the comment: I currently use the codec in my ucplib already and this is not a problem. I just thought that it might be useful for somebody else. But maybe it is to use case specific. If this codec is not of general interest I think this report can be closed.

[issue3649] IA5 Encoding should be in the default encodings

2008-08-25 Thread Marc-Andre Lemburg
Marc-Andre Lemburg <[EMAIL PROTECTED]> added the comment: I think what you're after is the encoding used in SMS messages: http://en.wikipedia.org/wiki/Short_message_service Here's an old discussion about this codec: http://mail.python.org/pipermail/python-list/2002-October/167267.html http://m

[issue3649] IA5 Encoding should be in the default encodings

2008-08-24 Thread Martin v. Löwis
Martin v. Löwis <[EMAIL PROTECTED]> added the comment: I don't think this codec should be named IA-5. IA-5 is specified in ITU-T Rec. T.50 (International Alphabet No. 5), recently renamed to "International Reference Alphabet", and it does *not* specify that the characters 0..31 are printable. Ins

[issue3649] IA5 Encoding should be in the default encodings

2008-08-24 Thread Antoine Pitrou
Changes by Antoine Pitrou <[EMAIL PROTECTED]>: -- priority: -> normal versions: +Python 2.7, Python 3.1 -Python 2.5 ___ Python tracker <[EMAIL PROTECTED]> ___

[issue3649] IA5 Encoding should be in the default encodings

2008-08-24 Thread Pascal Bach
Pascal Bach <[EMAIL PROTECTED]> added the comment: I have looked at utf_8.py and I think I know how to implement the incremental de/encoder. But I don't understand the codecs.register() function. Do I have to provide stateless, stateful and streamwriter at the same time? If I implement Increment

[issue3649] IA5 Encoding should be in the default encodings

2008-08-23 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: You could start with utf_8.py, and of course replace the calls to codecs.utf_8_encode and codecs.utf_8_decode. - your "ia5_encode" follows this interface: http://docs.python.org/dev/library/codecs.html#codecs.Codec.encode - your "ia5_d

[issue3649] IA5 Encoding should be in the default encodings

2008-08-22 Thread Pascal Bach
Pascal Bach <[EMAIL PROTECTED]> added the comment: Well I have seen the problem. I'm willing to do this to improve python, but I don't know exactly how to do it. I looked at how utf-8 and utf-7 are done but I didn't exactly understand, are they based on C code? Is there an example how this ne

[issue3649] IA5 Encoding should be in the default encodings

2008-08-22 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: The provided file does not work for "EXTENSION" characters: >>> import ia5 >>> u"[a]".encode("ia5") Traceback (most recent call last): File "", line 1, in File "ia5.py", line 18, in encode return codecs.charmap_encode(input,err

[issue3649] IA5 Encoding should be in the default encodings

2008-08-22 Thread Pascal Bach
New submission from Pascal Bach <[EMAIL PROTECTED]>: This encoding is used in the GSM standard it is a 7-bit encoding similar to ASCII. The encoding definition is found in: Short Message Service Centre EMI - UCP Interface 4.6 Specification (p. 79) as well as in: [3GPP 23.038] 3GPP TS 23.038 Alp