Netbeans does not display the first characters of the ASCII table. Java


☺☻ ♥ ♦ ♣ ♠ • ◘ ○ ◙♂♀ ♪ ♫ ☼►◄↕! ¶§▬↨ ↑ ↓ → ← ∟↔☻↔ ▲ ▼! "" # $% & '' ()) * +, -. / 01234568

When I print the first characters in Netbeans up to ! I get an empty box, try to change the encoding from UTF-8 to ISO-8859-1 in project properties and nothing, there is no way.

Does anyone have a solution?

asked by Ainhoa 14.02.2018 в 14:06

1 answer


It is not a Netbeans or Java theme. You can check on Wikipedia that:


The ASCII code reserves the first 32 codes (numbered from 0 to 31)   in decimal) for control characters: unintended codes   originally to represent printable information, but to   Control devices (such as printers) that used ASCII. By   example, character 10 represents the "new line" function (line   feed), which makes a printer advance the paper, and the character 27   represents the "escape" key that is often found in the corner   top left of common keyboards.

And 32 does show it to you, what happens is that it is space. 33 is the first visible (considering space as "not visible") and is the exclamation point !

Actually, as you can check with the characters of your question, if you have the font (font) compatible, those characters are displayed, but in a console or system terminal they are not usually shown:

But even to show it here, the browser uses other codes: the heart is the code 9829 (2665 in hexadecimal):

answered by 14.02.2018 в 15:31