Re: Another Cross Platform Delphi Tought
- From: "Allen Bauer (CodeGear)" <abauer@xxxxxxxxxxxxxxxxxxxxxx>
- Date: 20 Feb 2008 14:54:54 -0700
Zoren Lendry wrote:
Allen Bauer (CodeGear) wrote:
WideChar is a UTF-16 "character" which could be a high or low
surrogate. This is the format used by the underlying OS. Rather
than forcing expensive conversions all over the place,
UnicodeString will be UTF-16 encoded. Unless you're dealing with
data from old Phoenician texts, most things will not trip into
surrogates.
Aah, so the "char" section of WideChar is a bit misleading -- it
really just refers to the word size subsection of a Unicode string,
and then you potentially have just one more layer to climb up to get
what is normally thought of as a "char".
In the strictest sense, yes. At one point is was the same as a Unicode
Char. Since then, the Unicode.org has increased the number of code
points to $10FFFF, which necessitated the introduction of UTF-16.
Since Windows NT had already been shipping for a while, MS moved to
UTF-16 so that they wouldn't have to add "yet another layer of APIs."
Will there be a function to simply get the CharLength(AUnicodeString)
-- which knows about the surrogates?
Don't know yet. Possibly.
Loren sZendre
BTW, as a historical linguist, I just may be dealing with old
Phoenician someday!
I challenge you to find a font that contains those code-points :-)...
Processing text and rendering text for display and/or print are two
different things. You may be able to process the text, but I doubt
there would be very many fonts that will allow you to render the glyphs.
--
Allen Bauer
CodeGear
Chief Scientist
http://blogs.borland.com/abauer
.
- Follow-Ups:
- Re: Another Cross Platform Delphi Tought
- From: PavelS
- Re: Another Cross Platform Delphi Tought
- From: Zoren Lendry
- Re: Another Cross Platform Delphi Tought
- References:
- Another Cross Platform Delphi Tought
- From: maramirezc
- Re: Another Cross Platform Delphi Tought
- From: Rudy Velthuis [TeamB]
- Re: Another Cross Platform Delphi Tought
- From: Zoren Lendry
- Re: Another Cross Platform Delphi Tought
- From: Allen Bauer (CodeGear)
- Re: Another Cross Platform Delphi Tought
- From: Zoren Lendry
- Another Cross Platform Delphi Tought
- Prev by Date: Re: Another Cross Platform Delphi Tought
- Next by Date: Re: Another Cross Platform Delphi Tought
- Previous by thread: Re: Another Cross Platform Delphi Tought
- Next by thread: Re: Another Cross Platform Delphi Tought
- Index(es):
Relevant Pages
|
Loading