True, but if you want to support S-JIS et al (which would be useful for purposes of MUDs, even though MUX2.7 is just going the UTF-8 route to take the easier all-inclusive route), you'll need more than just the font.
For instance, MS Mincho can be used to render Japanese text regardless of what encoding it was encoded in. Just passing raw S-JIS data to it will generally not avail you much. If you choose to go down that path, you'll need to play with recording the encoding and using the MultiByteToWideChar and WideCharToMultiByte routines to convert between various encodings. Then you can ensure that whatever you get from the game, it's in a known encoding (namely, CP_ACP, which would be ideal for your circumstances if you want to support everything) and can be rendered the same way.
I agree that's the ideal path -- over on Mac OS X, in Atlantis, I have an encoding value for the remote site. If the user picks one, I use that for both incoming/outgoing. If the server uses RFC2066 to negotiate a charset I can speak, I switch to that for both outgoing/incoming. (Since the server knows better than I do what it wants to talk, after all!) If the server doesn't use RFC2066 and the user doesn't pick a specific encoding, I default to assuming that incoming is Latin1 and outgoing is ASCII (since that's how some games work).
If you want to go that route, I certainly won't discourage you! I'm all for other clients more fully supporting RFC2066! However, that's a much larger amount of work, to support many different encodings.
In the meantime, just conveying whether or not you're handling that 8th bit or not is at least 'sufficient' for advanced users; you already have an 'enable/disable' UTF-8 option, and you're just conveying whether or not that's enabled, in this case. (How you pick between Latin1 and ASCII is up to you, really. I'm just giving them as an example, since those are the three options MUX2.7 offers.)
This is the logic most MU* clients that support RFC2066 seem to use presently; they have a user-defined encoding, and if the server offers encodings they only return an accept if one of those encodings matches their own. Otherwise, it's a reject. I've discovered that Atlantis is a rarity inasmuch as it actually will change active encoding for the world based on what the server asks for. (I honestly didn't realize how everyone else had done it when I wrote that, or I might've saved myself a great deal of work, but...) |