I want to add the Indian Rupee Symbol to a program. This is a non GUI program targeted at Windows and will be run as exe from console. (I would convert it to exe by pyinstaller in the end). I tried using:
print unicode(u"\u20B9")+"12,500"
(As taken from http://www.fileformat.info/info/unicode/char/20b9/index.htm)
It works well in IDLE Interpreter but when I tried running the same code from cmd (Windows 7), it gave error:
Traceback (most recent call last):
File "D:\My Programs\Projects\StockExchangeSim.py", line 9, in <module>
print unicode(u"\u20B9")+"12,500"
File "C:\Python27\lib\encodings\cp850.py", line 12, in encode
return codecs.charmap_encode(input,errors,encoding_map)
UnicodeEncodeError: 'charmap' codec can't encode character u'\u20b9' in position
0: character maps to <undefined>
Is there a way to handle this? If there is, will it cause issues when used in other windows computers?