[DUG] Thai Baht Symbol - or Hex value to String converted
Brian Wrigley
bswrigley at xtra.co.nz
Fri Aug 3 14:47:58 NZST 2007
Hi Steve,
----- Original Message -----
From: "Steve Peacocke" <steve.peacocke at gmail.com>
To: "NZ Borland Developers Group - Delphi List" <delphi at delphi.org.nz>
Sent: Friday, August 03, 2007 8:46 AM
Subject: Re: [DUG] Thai Baht Symbol - or Hex value to String converted
> Except that I can see it rendered on a web page, I can copy that
> character into MS Word and it shows as a character. I can also copy
> that character into this email (ß) and it shows correctly (Gmail, on
> the internet).
By the time that gets to me in Outlook Express, it shows as an uppercase
beta (chr(223)). Possibly something along the way has converted it to the
nearest approximation that can be shown on my computer.
Pound, Euro, Yen and a few others are no problem - there are symbols for
them among the high characters of most of the common fonts. No such luck
with the Baht. Even if you encode the Baht character correctly (eg in
Unicode) most people will still only see either a question mark or a square
box unless they are using a suitable code page/font choice combination. In
Thailand they probably do; elsewhere, you might be out of luck.
> Therefore, there should be a way that I can display that character in
> a Label on a form.
You'd need a label component that uses Widestrings instead of strings, and
the user would need their machine set up appropriately. Otherwise they'd see
question marks or square boxes. You might be better to use a little icon or
write the word "Baht".
> Code Pages? A search of both D2007 and D7 help files produce a zero
> result on this. Can you elaborate?
Joel Spolsky explains the whole mess quite entertainingly here
http://www.joelonsoftware.com/articles/Unicode.html
Brian
More information about the Delphi
mailing list