• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Does anybody know how to print \u2064 and \u2065?

 
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here I mentioned range subtraction and range restriction operators, which I have since found, as 2a64 and 2a65, which are on this Unicode chart. Only they say anti-restriction, which means the same. I am blowed if I can get it to display anywhere. I even tried putting \u2a64 or %c . . . 0x2a64 into JOptionPane and got little squares. On Gedit and "bash" it appears as a square with 2a64 in.

Anybody know anything about this? Are these new symbols in Unicode? Have they been added since Java6 came out? Anybody know how to display them?
 
Ranch Hand
Posts: 174
Java ME Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That "thing" is called Unicode Escape.

Before use such strings, in most cases, You have to unescape it. Here, I will write down just to remember how do I do such unescaping manually:
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which font are you using? I wouldn't imagine that most common fonts have those; you'll probably have to resort to a special math font.
 
Campbell Ritchie
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you very much.

On JOptionPane it would appear to be the usual sans-serif font they use in Java. But I thought that was Unicode compliant; whenever I tried anything else in JOptionPane it has come out nicely. I also have no difficulty getting things like ▷ (\u25b7) to show on "bash".

campbell@*****-laptop:~$ ▷
bash: ▷: command not found
campbell@******-laptop:~$

And I could easily copy and paste to OpenOffice; I tried the following fonts: Nimbus Roman no 9, courier 10-pt, Bitstream Vera Sans, Tarablus, and the ▷ appeared clearly.
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't think there are any fonts that include the full range of Unicode characters - it would be huge! E.g., there's a font from Microsoft -Unicode Arial or some such- that has most of the CJK characters - it's more than 20MB, and probably still doesn't have math symbols.

Googling something like "unicode math fonts" should find appropriate ones. There are also tools that show for all installed fonts which characters are included; for OS X, UnicodeChecker (and UnicodeFontInfo) come to mind.

On my machine, only a font called "Apple Symbols" has the 2a64 and 2a65 characters.
 
Campbell Ritchie
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The nearest I could find so far was DejaVu fonts. There is somebody working on the range 2a**, so I shall log onto their forum and see if I can put in a request.

Thank you for the help.

C
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"bash" in your post suggests that you aren't using Windows, but still, Alan Wood's Unicode Resources might help.
 
Campbell Ritchie
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you very much, Paul. Caslon appeared promising from that page, but doesn't seem to support my glyphs (and I already had it). I have put in a request on the Deja Vu mailing list.
What's "Windows"?

C
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Everson Mono is a shareware font that has these (and many other rarely used) characters: http://www.evertype.com/emono/
reply
    Bookmark Topic Watch Topic
  • New Topic