• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Campbell Ritchie
Sheriff
Pie
Posts: 50171
79
  • Mark post as helpful
  • send pies
  • 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?
 
Zandis Murāns
Ranch Hand
Posts: 174
Java Java ME Opera
  • Mark post as helpful
  • send pies
  • 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:
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • 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
Sheriff
Pie
Posts: 50171
79
  • Mark post as helpful
  • send pies
  • 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: 42968
73
  • Mark post as helpful
  • send pies
  • 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
Sheriff
Pie
Posts: 50171
79
  • Mark post as helpful
  • send pies
  • 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
 
Paul Clapham
Sheriff
Posts: 21416
33
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • 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
Sheriff
Pie
Posts: 50171
79
  • Mark post as helpful
  • send pies
  • 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: 42968
73
  • Mark post as helpful
  • send pies
  • 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/
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic