Delphi Clinic C++Builder Gate Training & Consultancy Delphi Notes Weblog Dr.Bob's Webshop
Bob Swart (aka Drs.Bob) Dr.Bob's Delphi Clinics Dr.Bob's Delphi Courseware Manuals
View Bob Swart's profile on LinkedIn Drs.Bob's Delphi Notes
These are the voyages using Delphi Enterprise (and Architect). Its mission: to explore strange, new worlds. To design and build new applications. To boldly go...
Title:

Unicode tip #1 - don't forget the font

Author: Bob Swart
Posted: 11/22/2008 11:58:32 AM (GMT+1)
Content:

Delphi 2009 adds Unicode support to our developer toolbox, which enables us to express written languages but also Klingon or musical notes. However, not all fonts support the special Unicode characters (something to keep in mind when migrating legacy applications from ANSI to Unicode Strings). When a Unicode character is not supported by the font, you'll get a square. Note that this is different from a ? that you get when converting a Unicode character to an ANSI character (in which case information has been lost). A square does not indicate lost information, but merely a missing font glyph for the specified code point.

Klingon (U+F8D0 - U+F8FF) is supported by the shareware Code2000 font, whereas musical notes like the G Clef (𝄞) are supported by the freeware Code2001 font for example.

This tip is the first in a series of Unicode tips taken from my Delphi 2009 Development Essentials book available shortly on Lulu.com.

Back  


4 Comments

AuthorPostedComments
Olaf Monien 08/11/26 20:24:22You might mention that code points beyond the 16-Bit barrier (which are represented by surrogate pairs in UTF-16 that is), won't display in "normal" VCL controls - on XP System. Only TRichEdit works here. On Vista all controls work fine.
Louis Kessler 08/12/23 01:01:16Bob: What Unicode font would you recommend to be the default in the Delphi 2009 Unicode application I write that most people would have?
Fernando 09/12/08 15:28:55Thanks for the Klingon sample, but I'd rather have samples for Romulan instead...
Spriditis 10/02/14 03:43:18Correction for Olaf Monien: - testing on Delphi 2010 (Win XP) - TMemo and TEdit works fine (Code2001 font + $D834 $DD1E). But RichEdit still shows just squares.


New Comment (max. 2048 characters, no HTML):

Name:
Comment:



This webpage © 2005-2019 by Bob Swart (aka Dr.Bob - www.drbob42.com). All Rights Reserved.