xale / iTetrinet

TetriNET Client Developed for Mac OS X 10.5 Leopard
21 stars 9 forks source link

Unicode support needs testing #55

Closed xale closed 14 years ago

xale commented 14 years ago

54 should have been fixed by commits 69a1c3ff329462d487a7888c9b2c58b7a323a98e through 24eaa39ea773b8498c7104f7bb4aaec1a70f2e0b, but the entire system needs major abuse to find all the minor issues. I suspect, for instance, that some servers use ISO-8859-1 for their text encoding, and this will almost certainly cause attempts to parse as UTF-8 to fail; it may be that I will have to do as GTetrinet does and code in a fallback mechanism for this eventuality.

xale commented 14 years ago

Testing has revealed that we sometimes receive data that is not decodable with UTF-8, so as of ecdf645e5553c161ac499d7407f2daa96ce497be, incoming messages will automatically fall back to Windows-1252 encoding (the original TetriNET text encoding) in the event that parsing fails. We are still sending as UTF-8, as this will work with most clients, and only mis-render at the very worst. Nickname sanitization is now a little broken, however, since almost all non-blank names are valid, but many will show up completely wrong in clients that use Windows-1252 exclusively.

xale commented 14 years ago

Added an additional fallback encoding, ISO Latin-1, in f1f821259cfb494d26dbd0b6c6e39d2cc07e6ab0. Closing this ticket; new tickets will be opened if specific issues arise.