How to display special charecters like € and line feed symbol

Login to reply to this topic.
Thu, 2008-06-19 08:26
Joined: 2008-02-04
Forum posts: 4

Hi,
I m trying to implement Add Symbol control in my application.
When i write the code

_LIT(KEuro,"€");
gc.DrawText(KEuro,TPoint(20,20));

But on emulator the charecter does not show as it is, instead it prints a rectangular charecter.

Please suggest how to draw charecter as it is.
Thanks


Thu, 2008-06-19 09:13
Joined: 2005-11-20
Forum posts: 1157
Re: How to display special charecters like €

Maybe not the best or simplest way to do it, but worked for me:

TChar iEuroChar=TChar(0x20AC);
TBuf<1> iEuroString;
iEuroString.Append(iEuroChar);


René Brunner

Fri, 2008-06-20 01:25
Forum Nokia Champion
Joined: 2003-06-10
Forum posts: 708
Re: How to display special charecters like € and line feed symbo

And when you see the rectangle, then it means that the font (file) in use (or the default system font, if you're not specifying one yourself) does not have a glyph that corresponds to the codepoint.

Fri, 2008-06-20 08:45
Joined: 2008-02-04
Forum posts: 4
Re: How to display special charecters like € and line

thanks rbrunner,
ur solution worked.
Now i want to show enter symbol (symbol present on enter key of the computer keyboard),
So do u have any idea about its unicode value?
Thnks..

Fri, 2008-06-20 09:31
Joined: 2005-11-20
Forum posts: 1157
Try the CharMap utility

On a Windows PC, you can use the CharMap utility to explore Unicode fonts and hunt for characters and symbols (C:\Windows\System32\CharMap.exe).

Note, however, that there is no guarantee whatsoever that a font on the phone will offer the symbol that you want, and in case of a missing character you will get boxes, as N/A explained already.

Fonts on phones tend to offer rather few characters and symbols, because of space restrictions.


René Brunner

  • Login to reply to this topic.