We help IT Professionals succeed at work.

How do I use ALL of the characters in a font in a TEdit

PeterBlanchard
on
Medium Priority
302 Views
Last Modified: 2013-12-02
Platform:
Delphi 3, Windows 2000.

I want to use some of the characters supported by the Windows (2000) Arial font - specifically the Latin capital letter 'O' with a 'caron' symbol above (a bit like an upside down carat - unicode 01D1). I can see this symbol in the W2000 character map, but want to be able to put this character into a TEdit control - both via typing from the keyboard and programmatically.

I initially changed the Font and Font.Charset properties of the TEdit control, but I'm not getting very far - the Chr() function seems only to support characters to the value of 255 and then cycles back to 0 again, and if I try to copy and paste the symbol from the character map to the TEdit, it simply inserts a question mark.

Any suggestions would be much appreciated.
Comment
Watch Question

Arial is a Unicode font making the letters WideChar.
The VCL can only use Chars so all WideChars are converted down to Chars resulting in the question mark for unconvertible letters.

Sorry, no chance.

Commented:

 Var C: Char;
 C := Chr(200); // 200 can be any ACSII value
 
 If it can be displayed, this will do it via the ASCII table.


Don

Commented:
hi PeterBlanchard

Have a look at Mike Lische component 'Unicode Syntax Edit (USE) v.1.3 '

on Torrys:

http://www.torry.net/diffedits.htm

regards

Aubs

Commented:
Robert is right, however, I'd rather say "no chance with the built-in VCL components" - the Delphi compiler itself does support Unicode strings.

Commented:
which, I think may be the same as this project: http://www.delphi-unicode.net/#UnicodeEdit

GL
Mike

Explore More ContentExplore courses, solutions, and other research materials related to this topic.