I have successfully been calling Unicode characters in Java. However, I cannot call this particular symbol of a pedestrian... <a href="http://www.fileformat.info/info/unicode/char/1f6b6/index.htm" rel="nofollow">http://www.fileformat.info/info/unicode/char/1f6b6/index.htm</a>
I am following the directions on the website but it displays an empty block:
What am I doing wrong?Answer1:
This is a font issue. The font(s) being used do(es) not contain a glyph for the character, hence the rendering software displays a generic symbol like a rectangle instead.
If you follow the link <a href="http://www.fileformat.info/info/unicode/char/1f6b6/index.htm" rel="nofollow">Fonts that support U+1F6B6</a> on the page you mention in the question, you will get the information that only <a href="http://users.teilar.gr/~g1951d/" rel="nofollow">Symbola</a> contains the character PEDESTRIAN (U+1F6B6). (The LastResort font mentioned there is a pseudo-font, useful in software development but not in rendering characters.) This should not be a surprise, as it was introduced in Unicode 6, in 2010. It generally takes about ten years or more for a character to get reasonably well supported in fonts.
Sufficiently new versions of Segoe UI Symbol also contain U+1F6B6, but Segoe UI Symbol is proprietary, shipped with Windows 7 and Windows 8, and you may need an update to it to get a version that supports U+1F6B6. Symbola, on the other hand, is a free font.Answer2:
It's not necessarily that you're doing something wrong (though you failed to give a code example in context).
Bear in mind, if you didn't already know, that most computers have <em>only a portion</em> of the unicode set installed. There are a number of funny characters like that that won't work on every computer.
Some are safe - like the accented á, etc. - but not all of them.
Generally, if you found one that wasn't installed on your computer, I would avoid trying to get it onto your computer - if you ever plan for that Java program to run anywhere else (which is the idea of Java, right?) - since your program would fail on any other computer without it.
Sorry to disappoint - I've felt the same disappointment when I found cool things that didn't work in unicode.
<a href="http://smallbusiness.chron.com/unicode-symbols-not-display-java-39315.html" rel="nofollow">http://smallbusiness.chron.com/unicode-symbols-not-display-java-39315.html</a>
<a href="http://knowyourmeme.com/memes/this-is-bob" rel="nofollow">http://knowyourmeme.com/memes/this-is-bob</a>