質問する
16414 次
4 に答える
14
the corresponding unicode character is 0x2588
, so use that:
print unichr(0x2588) # or:
print u"\u2588"
should give you the right result.
if you want it in a different encoding, you can always encode
it.
于 2012-05-17T12:03:25.140 に答える
6
The character you posted isn't 219, it's 9608. And printing it should work fine:
python3:
>>> ord("█")
9608
>>> chr(9608)
'█'
python2:
>>> unichr(9608)
u'\u2588'
>>> print(u'\u2588')
█
if you still have troubles, set your teminal to use utf-8 and .encode()
to utf-8 if neccessary.
于 2012-05-17T12:02:59.507 に答える
2
その文字はMac用の拡張ASCIIテーブルには存在しませんが、Unicode表現は機能します。
于 2012-05-17T12:08:24.050 に答える
0
于 2019-12-08T07:16:14.213 に答える