1
有以下代碼:打印貨幣符號正確
#-*- coding: utf-8 -*-
import locale
locale.setlocale(locale.LC_MONETARY, "Polish")
current_locale = locale.localeconv()
print current_locale["currency_symbol"]
有結果是:
z�
然而波蘭貨幣符號是「zl模塊」,所以「L」被嚴重打印爲' 。如何正確打印?
您的控制檯是否設置爲UTF-8? – kennytm 2012-01-05 18:22:31
我想是這樣的:print「ąśćäåńêëł」打印正確 – scdmb 2012-01-05 18:25:38
http://wiki.python.org/moin/PrintFails – Li0liQ 2012-01-05 18:27:25