Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Libraries and TheIDE: i18n, Unicode and Internationalization » How to display utf8 graphical sign
How to display utf8 graphical sign [message #42479] Tue, 18 March 2014 20:24 Go to next message
forlano is currently offline  forlano
Messages: 1182
Registered: March 2006
Location: Italy
Senior Contributor
Hello,

here are http://www.utf8-chartable.de/unicode-utf8-table.pl?start=960 0&number=128
some utf8 characters and relative code that I would like to show in a LineEdit.

Unfortunately I am able to show few of them while others appear as white box. I have read that this depends by the font installed on my computer. On this topic I am very confused. I have two questions:

1) is there some specific font Upp compatible that let me show most of the graphical characters (I need circle/square full/half white/black colored and some arrows);

2) What will happen to other users of my app if he does not have the same font?

If this is not possible within Upp I'll try to work with HTML document.

Thanks,
Luigi
Re: How to display utf8 graphical sign [message #42509 is a reply to message #42479] Thu, 20 March 2014 16:19 Go to previous messageGo to next message
deep is currently offline  deep
Messages: 263
Registered: July 2011
Location: Bangalore
Experienced Member
Hi Luigi,

If you are using windows then "Arial Unicode MS" will be available. It has all characters. There is Linux equivalent available.

Enclosed sample code.

I have not set special font. It is system default StdFont().

If with stdfont you are not getting desired result then you can set font like this

        int FontIndx = Font::FindFaceNameIndex("Arial Unicode MS");
	Font MyFont = Font(FontIndx,20);
	LineEdit.SetFont(MyFont);


index.php?t=getfile&id=4473&private=0
  • Attachment: Unicode.png
    (Size: 25.82KB, Downloaded 462 times)
  • Attachment: UniCTest.7z
    (Size: 1.05KB, Downloaded 511 times)


Warm Regards

Deepak

[Updated on: Thu, 20 March 2014 16:29]

Report message to a moderator

Re: How to display utf8 graphical sign [message #42523 is a reply to message #42509] Thu, 20 March 2014 22:54 Go to previous messageGo to next message
forlano is currently offline  forlano
Messages: 1182
Registered: March 2006
Location: Italy
Senior Contributor
Hi Deepak,

thank you for the answer.
Your test case works on my systems (windows XP and linux lubuntu).
In general everything works when I create text files with Upp and then display it by linedit. But it fails when the text file are made by other programs (no Upp) and I import it in linedit.
Who creates the text file (via a Java program) assure me it is utf-8 encoded Rolling Eyes .

Best regards,
Luigi

[Updated on: Thu, 20 March 2014 22:54]

Report message to a moderator

Re: How to display utf8 graphical sign [message #42526 is a reply to message #42523] Fri, 21 March 2014 04:37 Go to previous message
deep is currently offline  deep
Messages: 263
Registered: July 2011
Location: Bangalore
Experienced Member
Hi Luigi,

One suggestion. Check the files created by other application using notepad++. If it shows all characters as expected then mostly UPP will also display it properly.


Warm Regards

Deepak
Previous Topic: Fixed some Chinese translation in Core.t
Next Topic: On trunk some help links do not work
Goto Forum:
  


Current Time: Thu Mar 28 19:10:13 CET 2024

Total time taken to generate the page: 0.01336 seconds