Skip to content
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

Add tests for 7bit latin-1 encoding #2

Open
pmarti opened this issue Jun 9, 2010 · 4 comments
Open

Add tests for 7bit latin-1 encoding #2

pmarti opened this issue Jun 9, 2010 · 4 comments

Comments

@pmarti
Copy link
Owner

pmarti commented Jun 9, 2010

This area was slightly broken until recently due to our lack of unittests in this area. Having some unittests that explicitly target 7bit decoding (and not the rest of the PDU toolchain) would be very nice.

@pmarti
Copy link
Owner Author

pmarti commented Jun 10, 2010

Just added some tests in fed5ed1

This has helped to find an incorrect translation (ñ) in gsm0338.py, I need to add more tests or pimp up the existing ones to make sure the rest of the gsm0338 characters are OK.

@andrewbird
Copy link
Collaborator

I'm not sure if you meant Unicode <-> GSM 0338 encoding tests, I just added those and uncovered a couple of little bugs. There's still one thing I can't quite get my head around, are we supposed to be able to encode and decode 0x0000? For now I excluded it from the test, but if so we should fix the code and enable it in the test.

@pmarti
Copy link
Owner Author

pmarti commented Dec 18, 2011

Not really sure about 0x0000... I guess that for quality-wise would be good to handle it. Please do apply your patches

@andrewbird
Copy link
Collaborator

I pushed the three remaining patches. I held fire on the 0x0000 mapping, at the moment it would be asymmetric so could only go in the encode method with 'replace', but I think there is a special sequence of events that might allow it to be decoded too. It's something like if '\x40' appears when it's followed by valid character it becomes '@' if it's followed by '\x00' it's 0x0000.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants