Re: Getting prepared for Unicode
- From: Pierre le Riche <pleriche@xxxxxxxxxxx>
- Date: Sun, 17 Jun 2007 13:47:04 +0200
Hi Allen,
SizeOf(Char) = 2
string = UnicodeString
If I may throw in a request here: Please don't neglect the UTF8String type.
UTF-8 uses less storage than UTF-16 when working with mostly European languages. Also, neither encoding uses a fixed number of bytes for every Unicode code point, so there is not much difference in the degree of code complexity required to manipulate strings using either encoding.
Since conversion between UTF-8 and UTF-16 is quite fast, I generally prefer storing and manpulating all text in UTF-8 format, converting to UTF-16 only for displaying the text through the Windows API. (The CPU time used for conversion from UTF-8 to UTF-16 is insignificant compared to the time taken to render the display output.)
It would be useful if the language supported implicit conversions between UnicodeString and UTF8String, similar to the way it currently does with WideString and AnsiString.
Thanks,
Pierre
.
- Follow-Ups:
- Re: Getting prepared for Unicode
- From: dk_sz
- Re: Getting prepared for Unicode
- From: Markus Spoettl (toolsfactory)
- Re: Getting prepared for Unicode
- From: Eric Grange
- Re: Getting prepared for Unicode
- References:
- Getting prepared for Unicode
- From: Terry Haan
- Re: Getting prepared for Unicode
- From: Nick Hodges (CodeGear)
- Re: Getting prepared for Unicode
- From: Markus Spoettl (toolsfactory)
- Re: Getting prepared for Unicode
- From: Craig Stuntz [TeamB]
- Re: Getting prepared for Unicode
- From: Erik Springelkamp
- Re: Getting prepared for Unicode
- From: Allen Bauer (CodeGear)
- Getting prepared for Unicode
- Prev by Date: Re: Delphi 2007 help in other formats
- Next by Date: Re: Will there be anymore support for Delphi 2006?
- Previous by thread: Re: Getting prepared for Unicode
- Next by thread: Re: Getting prepared for Unicode
- Index(es):
Relevant Pages
|