I am using python for mac osx, I want to use extended ascii # 219, as in this table:
http://www.theasciicode.com.ar/extended-ascii-code/graphic-character-ascii-code-178.html
The problem is, I found out that the symbol "block" does not exist in mac ascii ... I'm not sure. Can someone help me? try printing with unichr (219) giving me a different result. he will output → Û. what i want → █
Thanx
the corresponding unicode0x2588 character is equal , so use this:
0x2588
print unichr(0x2588) # or: print u"\u2588"
should give you the correct result. if you want it in a different encoding, you can always have encodeit.
encode
ASCII Mac, unicode .
, , 219, 9608. :
python3:
>>> ord("█") 9608 >>> chr(9608) '█'
python2:
>>> unichr(9608) u'\u2588' >>> print(u'\u2588') █
if you still have problems, set your teminal to use utf-8 and .encode()in utf-8, if necessary.
.encode()