Bug in utf8_mbstowcs

From: Michael W Zappe (zapman@interlan.net)
Date: Thu Apr 06 2000 - 12:29:02 EST


There is one section in utf8_mbstowcs which causes me to wonder how nls/Unicode works at all in the kernel. After the utf8_mbtowc call, op is incremented by size, which should skip legitimate characters. In going from utf8 to utf16, we should have this logic there instead. If the input sequence was > 3 bytes, then we add two bytes to op, since the character is a surrogate, otherwise, just increment it. Here's a patch to do this. Just in case i have my head up my ass or something, let me know what i'm missing if this isn't the case! ;-)

        Mike



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Apr 07 2000 - 21:00:17 EST