is required for the chosen internal encoding in the init function,
as this seems to have a better chance of working under Irix and
Solaris.
Also change the test character from '\x01' to '0'.
This might fix SF bug #690309.
{
PyObject *m;
- char in = 1;
+ char in = '0';
char *inptr = ∈
size_t insize = 1;
Py_UNICODE out = 0;
size_t outsize = sizeof(out);
size_t res;
- iconv_t hdl = iconv_open(UNICODE_ENCODING, "ASCII");
+ iconv_t hdl = iconv_open(UNICODE_ENCODING, "ISO8859-1");
if (hdl == (iconv_t)-1) {
PyErr_SetString(PyExc_RuntimeError,
/* Check whether conv() returned native endianess or not for the chosen
encoding */
- if (out == 0x1)
+ if (out == 0x30)
byteswap = 0;
#if Py_UNICODE_SIZE == 2
- else if (out == 0x0100)
+ else if (out == 0x3000)
#else
- else if (out == 0x01000000)
+ else if (out == 0x30000000)
#endif
byteswap = 1;
else {