Instead throw an -EILSEQ error.
Signed-off-by: Tjalling Hattink <t.hattink@fugro.nl>
SVN-Revision: 43089
return -1;
}
-static inline char latin9_translit(wchar_t c)
+static inline wchar_t latin9_translit(wchar_t c)
{
/* a number of trivial iso-8859-15 <> utf-8 transliterations */
switch (c) {
case 0x0152: return 0xBC; /* OE */
case 0x0153: return 0xBD; /* oe */
case 0x0178: return 0xBE; /* Y diaeresis */
- default: return '?';
+ default: return 0xFFFD; /* cannot translate */
}
}
c = latin9_translit(c);
/* fall through */
case LATIN_1:
+ if (c > 0xff) goto ilseq;
if (!*outb) goto toobig;
- if (c < 0x100) **out = c;
- else x++, **out = '*'; //FIXME: translit?
+ **out = c;
++*out;
--*outb;
break;