Search code examples
delphiunicodedelphi-6

Displaying Baht Character Symbol in Delphi6


One of our legacy applications is in Delphi6 and we are having trouble in displaying the currency symbol of "Baht" in this application's labels and textedits.

We are using the Unicode of Baht to set the text of the labels/textedits (i.e. 0E3F) but it is always rendered as a '?'.

We tried changing the Font properties of the said labels/textedits to ANSI_CHARSET, DEFAULT_CHARSET (and even THAI_CHARSET) but no luck. And the font type selected is "Microsoft Sans Serif" which has the currency symbol of Baht (not 'MS Sans Serif' which does not have the Baht currency symbol).

Has anyone encountered this in Delphi6 and if so are there any solutions?

Thanks in advance..!!


Solution

  • We are using the Unicode of Baht to set the text of the labels/textedits (i.e. 0E3F) but it is always rendered as a '?'.

    The ? character indicates that when the Unicode character was converted to ANSI, no character was found in the ANSI code page in use. Your options:

    1. Use an ANSI code page that includes this character, that is Windows-874.
    2. Stop using ANSI and start using Unicode.

    The latter option is better, but of course a little tricky in Delphi 6 which, out of the box, is an ANSI based tool. To make Unicode GUIs with Delphi 6 you need to use the TNT Unicode components.