|
|
Fredrik Eriksson <fe79}--at--{yahoo}--dot--{com> wrote:
> On Sun, 31 Jan 2010 23:10:45 +0100, Warp <war### [at] tagpovrayorg> wrote:
> >
> > If Windows takes the raw Unicode value (as entered by the user) and
> > encodes it in UTF-16 before passing it to the application, that would
> > mean that the application must understand UTF-16 as its input from (what
> > it perceives as) the keyboard.
> UTF-16 is the internal system encoding in all NT-based versions of
> Windows. It is also the encoding in which programs receive incoming
> character codes.
I don't understand how that can work. Do programs convert the UTF-16
encoded characters back to raw Unicode values before using them? (Does
this perhaps happen inside the system call which is used to read the
character?)
UTF-encoded text (regardless of which UTF encoding scheme is used)
cannot easily be used directly in programs because characters cannot
be easily indexed (because UTF is a variable-length encoding scheme;
in the case of UTF-16 each character is either 2 or 4 bytes long,
depending on the Unicode value.) I have hard time believing that programs
are internally handling the text in UTF-16 format, so I'm assuming that
a decoding to raw Unicode is done first.
> > Which programs actually support that?
> I think most Windows programs are capable of handling Unicode these days.
But how do they handle the characters? Do they ask the system for a
(Unicode) character and get a raw Unicode wide char?
--
- Warp
Post a reply to this message
|
|