I added some limited Unicode support to mTCP Telnet and mTCP IRCjr in the last release a few months ago.
- I used a text file to store the mapping. That lets people add code points or make corrections if they don't like the choices I made. - The code uses the text file both ways; to figure out what Unicode code point to send for a local high-bit character and what character to display when a Unicode code point is detected. - The current mapping is pointed to by a text file. - I don't try to detect the current code page in use. The user is responsible for pointing at the correct text file. While simple, this is also flexible. - I used a hash table to make the mappings pretty fast. (I've seen some horrible code that did linear searches of a table, and that's painful to sit through.) A centralized mapping would be nice, but then you will run into the question of how strict you want the code to be. The conversion from the current code page to Unicode should always be strict as Unicode has far many more glyphs. But incoming Unicode can be mapped loosely or strictly, and in my case I went for loose because I wanted the output to be useful to humans and not full of "tofu" characters. A strict mapping can be shared but a loose mapping is probably best application specific. -Mike
_______________________________________________ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user