New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IA5 Encoding should be in the default encodings #47899
Comments
This encoding is used in the GSM standard it is a 7-bit encoding similar I think this encoding would be useful for other GSM specific use cases. |
The provided file does not work for "EXTENSION" characters: >>> import ia5
>>> u"[a]".encode("ia5")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "ia5.py", line 18, in encode
return codecs.charmap_encode(input,errors,encoding_map)
TypeError: character mapping must be in range(256) I doubt this can be achieved with just a charmap. You will have to roll |
Well I have seen the problem. I'm willing to do this to improve python, but I don't know exactly how I looked at how utf-8 and utf-7 are done but I didn't exactly Is there an example how this needs to be done? It would be nice if you |
You could start with utf_8.py, and of course replace the calls to
|
I have looked at utf_8.py and I think I know how to implement the Thank you for your help. |
I don't think this codec should be named IA-5. IA-5 is specified in If GSM uses a modified version of this, it should receive a separate # Alphanumeric characters are encoded as two numeric IA5 characters, So it *uses* IA5 to hex-encode the encoding. To achieve that, one would text.encode("emi-section-2").encode("hex") [Notice that the "hex" codec already uses IA-5] In any case, I don't think this is general enough to deserve inclusion |
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 Note that nowadays, SMSCs and interface software such as Kannel I agree with Martin, that the stdlib is not the right place for such a |
I currently use the codec in my ucplib already and this is not a |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: