POV-Ray : Newsgroups : povray.off-topic : Unicode : Re: Unicode Server Time
4 Sep 2024 19:21:44 EDT (-0400)
  Re: Unicode  
From: Fredrik Eriksson
Date: 31 Jan 2010 18:49:36
Message: <op.u7e8gwys7bxctx@toad.bredbandsbolaget.se>
On Mon, 01 Feb 2010 00:21:33 +0100, Warp <war### [at] tagpovrayorg> wrote:
> Fredrik Eriksson <fe79}--at--{yahoo}--dot--{com> wrote:
>> 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?)

>> 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?

When dealing with just one character at a time, the application receives  
UTF-16 code points and must identify and deal with surrogates if needed.  
For display purposes, one can offload some of the work on the Uniscribe  
API. Mostly though, strings are passed around as a whole (i.e. as lists of  
code points), in which case it "just works"; all standard widgets and  
API-functions fully support supplementary characters.

For an application that does not need to deal with "exotic" alphabets  
(e.g. Chinese), one can typically get away just fine with treating the  
UTF-16 code points as if they were UCS-2.



-- 
FE


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.