[SDL] SDL 1.3: UTF-8 vs UTF-16 vs UTF-32?
slouken at devolution.com
Fri Feb 3 08:20:58 PST 2006
In SDL 1.3 we'll be doing a few things to improve internationalized input:
(all subject to discussion and real-world testing)
* The SDLK_* keysym value will be defined as the unmodified (shift, etc.)
Unicode value of printable keys, and constants in a special range for
* The keysym state array will no longer be exposed, instead you'll have
to call a new API function to explicitly query a key state.
* The constant SDLK_LAST will no longer exist
* The 'unicode' field of the SDL keysym will no longer exist.
* Text input will be handled through a set of new messages:
SDL_CHAR, SDL_PRECOMPOSED_CHAR (plus other IME messages)
The question is, for Unicode input messages, should the data be UTF-8,
UTF-16, or UTF-32? It's very possible for a single message to contain a
string of multiple characters, because of the way text compositioning works.
In the same way, should the call to retrieve the name of a key return
UTF-8 text or UTF-16/32 characters?
-Sam Lantinga, Senior Software Engineer, Blizzard Entertainment
More information about the SDL