When I run it on my Mac OS X 10.10 (Yosemite) terminal using Lucida Console as the font, I get the output shown below:
$ printf "%s\n" u+263a u+0020 u+26a0 u+0020 u+2622 | unicode-utf8
☺ ⚠ ☢
$ printf "%s\n" u+263a u+0020 u+26a0 u+0020 u+2622 | unicode-utf8 | odx
0x0000: E2 98 BA 20 E2 9A A0 20 E2 98 A2 0A ... ... ....
0x000C:
$ printf "%s\n" u+263a u+0020 u+26a0 u+0020 u+2622 | unicode-utf8 | utf8-unicode
(standard input):
0xE2 0x98 0xBA = U+263A
0x20 = U+0020
0xE2 0x9A 0xA0 = U+26A0
0x20 = U+0020
0xE2 0x98 0xA2 = U+2622
0x0A = U+000A
$
The program unicode-utf8
, utf8-unicode
, and odx
are all home-brew programs (the Unicode ones are not particularly elegant), but they allow me to do analysis work with Unicode. And, at least on my computer, all three symbols show up. When they were not separated by spaces, then the triangle and the radiation symbols overlapped on the screen (unlike in the browser), which is why I added the spaces:
☺⚠☢
So, I suggest looking hard at the output of the script you show. You might be seeing an encoding problem, or the curses library may not be properly aware of UTF-8, or …
When I run with Python 2, I get:
\u263a \u26a0 \u2622
\u263a \u26a0 \u2622
\u263a \u26a0 \u2622
\u263a \u26a0 \u2622
\u263a \u26a0 \u2622
\u263a \u26a0 \u2622
\u263a \u26a0 \u2622
\u263a \u26a0 \u2622
\u263a \u26a0 \u2622
\u263a \u26a0 \u2622
When I run with Python 3, I get:
☺ ☢
☺ ☢
☺ ☢
☺ ☢
☺ ☢
☺ ☢
☺ ☢
☺ ☢
☺ ☢
☺ ☢
This means that I can reproduce the problem, but it seems to be a problem in Python rather than in the terminal.
I ran:
$ python3 so.26919799.py > py3.output
$ odx py3.output
The relevant part of the output is:
0x1D60: 20 20 20 20 20 20 20 1B 5B 36 35 3B 31 48 20 20 .[65;1H
0x1D70: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
* (5)
0x1DD0: 20 20 20 20 20 20 20 20 20 20 20 08 20 08 1B 5B . ..[
0x1DE0: 34 68 20 1B 5B 34 6C 1B 5B 48 0A E2 98 BA 20 20 4h .[4l.[H....
0x1DF0: 20 E2 98 A2 0D 0A E2 98 BA 20 20 20 E2 98 A2 0D ........ ....
0x1E00: 0A E2 98 BA 20 20 20 E2 98 A2 0D 0A E2 98 BA 20 .... ........
0x1E10: 20 20 E2 98 A2 0D 0A E2 98 BA 20 20 20 E2 98 A2 ........ ...
0x1E20: 0D 0A E2 98 BA 20 20 20 E2 98 A2 0D 0A E2 98 BA ..... ........
0x1E30: 20 20 20 E2 98 A2 0D 0A E2 98 BA 20 20 20 E2 98 ........ ..
0x1E40: A2 0D 0A E2 98 BA 20 20 20 E2 98 A2 0D 0A E2 98 ...... .......
0x1E50: BA 20 20 20 E2 98 A2 1B 5B 3F 31 6C 1B 3E 1B 5B . ....[?1l.>.[
0x1E60: 6D 0D 1B 5B 35 34 42 1B 5B 4B 1B 5B 36 35 3B 31 m..[54B.[K.[65;1
0x1E70: 48 1B 5B 32 4A 1B 5B 3F 34 37 6C 1B 38 0D 1B 5B H.[2J.[?47l.8..[
0x1E80: 3F 31 6C 1B 3E ?1l.>
0x1E85:
The 0x1D60:
indicates a byte offset in the file. My terminal window is 110 wide and 65 deep, so there were a lot of blanks being generated by the output. The * (5)
line indicates 5 more lines of 16 blanks. Then you can see some data containing bytes E2 98 BA and E2 98 A2, but in between there are three blanks, instead of the E2 98 A0 you'd expect. So, the translation of the alert symbol is being mishandled by Python 3.