Den 27-12-2011 23:36, Tim Mann skrev:
 > (copying the tranlated item names to a buffer, and zeroing a byte in
it based on the board width
 > through an emperically derived linear formula that worked for English
before sending it to the X-server).

If the item name is in UTF-8, doing that blindly can leave you with an
invalid UTF-8 character at the end of the truncated string. In fact you
might end up with no valid characters, just one invalid one.

Yes, as said before in this thread you have to use the C99 function mbtowc() or some library dedicated to handle multibyte char strings.

_______________________________________________
Bug-XBoard mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-xboard

Reply via email to