Hi Klaus,
in our devices (barcode reader) we use 16 bit characters and it works out nice and easy and very similar to the old bytes. It was not easy to convince my collegues (in the USA), but I managed to do it.

IMHO this is much simpler than the UTF8, all the index into a string still works.
I added overloads of the lib functions which are 16 bits wide
Example: wchar_t *strcpy(wchar_t *pOut, wchar_t *pIn);
So the code even looks like in the old days.
If you like I can mail you some files.

This approach seams to be not used in the Linux world, I do not understand why. UTF8 is a pain! The argument about the bigger buffers do not count in todays devices and is not that much. You only have to be carefull to treat characters as such and binary bytes as such (still a byte).
Many programmers mix that up.

Many regards, Dieter Fauth :-)

vdr mailing list

Reply via email to