Messages in this thread | | | Date | Tue, 4 Jul 2000 00:24:51 +0200 (CEST) | From | Urban Widmark <> | Subject | Re: [patch] forward port of 16 bit nls (vfat, ntfs, ncpfs, |
| |
On Mon, 3 Jul 2000, Petr Vandrovec wrote:
> For example uni2char() of cp950 will translate 0xFFFF to two '?' and will > return 0, because of unused fields in u2c_FF[] are filled with 0x3F...
Ah. I never thought about why there where so many 0x3F's ... That's pretty bad and makes my attempts to be nice and return -1 kind of pointless. Hmm, I need to think about this (or have someone tell me why ? is such a good error code).
> BTW, these tables do not follow uni1 = low, uni2 = high byte, as nicely > shown in cp950's char2uni(): > > *uni1 = charset2uni[cl].uni2; > *uni2 = charset2uni[cl].uni1;
No, and uni1/uni2 is confusing enough as it is (I added a comment to nls.h just so that I knew where to look when I needed to remind myself next time).
> Maybe you should pass these tables through some filter to byteswap > them? Or convert uni1/uni2 to simple unsigned short? As compiled
Not without knowing why they look like they do. They are (hopefully) autogenerated from somewhere, and it's also nice to have them in the same format in 2.2 and 2.4. OTOH it's not a difficult filter.
Since the tables are internal to the codepage it doesn't really matter, except if someone looks at the table to guess which of uni1 and uni2 is the low/high.
> P.S.: Thanks for UTF8 table.
Your welcome, and thanks for the makefile.
/Urban
- 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/
| |