diff options
-rw-r--r-- | Modules/_iconv_codec.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/_iconv_codec.c b/Modules/_iconv_codec.c index 1d2e5d4..a26a341 100644 --- a/Modules/_iconv_codec.c +++ b/Modules/_iconv_codec.c @@ -671,17 +671,17 @@ init_iconv_codec(void) size_t outsize = sizeof(out); size_t res; - iconv_t hdl = iconv_open(UNICODE_ENCODING, "ISO8859-1"); + iconv_t hdl = iconv_open(UNICODE_ENCODING, "ISO-8859-1"); if (hdl == (iconv_t)-1) { - PyErr_SetString(PyExc_RuntimeError, + PyErr_SetString(PyExc_ImportError, "can't initialize the _iconv_codec module: iconv_open() failed"); return; } res = iconv(hdl, &inptr, &insize, &outptr, &outsize); if (res == (size_t)-1) { - PyErr_SetString(PyExc_RuntimeError, + PyErr_SetString(PyExc_ImportError, "can't initialize the _iconv_codec module: iconv() failed"); return; } @@ -698,7 +698,7 @@ init_iconv_codec(void) byteswap = 1; else { iconv_close(hdl); - PyErr_SetString(PyExc_RuntimeError, + PyErr_SetString(PyExc_ImportError, "can't initialize the _iconv_codec module: mixed endianess"); return; } |