[I18n-sig] error handling in charmap-based codecs
Tamito KAJIYAMA
kajiyama@grad.sccs.chukyo-u.ac.jp
Wed, 20 Dec 2000 21:31:05 +0900
Martin v. Loewis wrote:
|
| IMO, it should read
|
| if (x == NULL) {
| if (PyErr_ExceptionMatches(PyExc_LookupError)) {
| /* No mapping found: default to Latin-1 mapping */
| PyErr_Clear();
| x = Py_None;
| Py_INCREF(x);
| } else
| goto onError;
| }
I agree.
| I can't see any reason for defaulting to *Latin-1*.
Yes. Passing characters intact might be okay for Latin-1
variants, but is not at all for non-Latin encodings. Also, I
don't think that defaulting to Latin-1 is the same as copying
characters which do not have corresponding characters in an
encoding.
Regards,
--
KAJIYAMA, Tamito <kajiyama@grad.sccs.chukyo-u.ac.jp>