Phone encoding error handling without rugs
"Simon C" <[email protected]>
| Newsgroups | gmane.comp.mobile.bitpim.devel |
|---|---|
| Message-ID | <002901c65698$384fa800$0201a8c0@HOME> |
Unicode decode errors occur if the phone is sending us text in a charset we are not expecting. This can be fixed by using the UNICODE_STRING and configuring it to match the phone. I propose adding a new exception (PhoneStringDecodeException) for this case, but no exception handler, no rug sweeping here:-). Unicode encode errors occur if the user enters text into bitpim (or gets data from another phone) that we cannot convert into the charset of the phone. In the case of ascii we can try to silently degrade, if another charset is used or there is no graceful degrading possible I propose to add a new exception (PhoneStringEncodeException) which is handled in the gui exception handler. Screenshot attached. I plan to change the regular string class to use unicode internally, it will then be the same as the UNICODE_STRING class, but hardcoded to use ascii. I've found some graceful degrading code examples for latin-1 on-line I plan to add. Thoughts? Simon
unicode_handler.JPG
(application/octet-stream, 13.4 KB) - not displayed