We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › Special Characters
Page Index Toggle Pages: 1
Special Characters (Read 879 times)
Special Characters
Dec 4th, 2006, 12:22am
 
(beta 0123) How do i get processing to show characters like ρ (Latin small letter eng U+0148 in Times New Roman) or "Д" or "ρ Х Њ" ?

I'm loading Times New Roman as my font and a csv file in UTF-8 that has all the right characters appearing in the notpad view.  In processing it's showing a character, but the wrong one. for example it shows "ρ" instead of Ï.

when i try to display the character by writing
text('ρ');
nothing appears.


Re: Special Characters
Reply #1 - Dec 4th, 2006, 12:26am
 
Ok so I can't even get the characters to show up here.  They are all unicode special characers like greek and latin letters.  How do I get these to display in Processing?
Re: Special Characters
Reply #2 - Dec 4th, 2006, 2:04am
 
use the unicode sequence, which is a four digit hex number. so  for U+0148, you can use "the character is \u0148". or for a single character: char c = '\u0148';

the &#961 sequences are decimal (not hex) numbers, so you'll have to figure out their hex equivalent, or use a unicode table.
Re: Special Characters
Reply #3 - Dec 4th, 2006, 2:55am
 
thank for the super fast response.  \u0148 happens to work, but others like \u03C1 \u03bc \u03b3 don't work.  Is there a way to get those to work?
Re: Special Characters
Reply #4 - Dec 4th, 2006, 2:58pm
 
check the box that says "include all characters" when creating the font. however i don't recommend doing so with an extremely large font like arial unicode, you'll run into memory problems.
Re: Special Characters
Reply #5 - Dec 4th, 2006, 3:28pm
 
Perfect!  Thank you Ben!
Page Index Toggle Pages: 1