我希望你的幫助與一個希望瑣碎的問題。最近我開始學習Python,以便與Google App Engine環境一起工作。不用說,我從最簡單的Hello World應用程序開始。它谷歌應用程序引擎與Python的utf-8編碼問題
英文版作品就好
然而,當我試圖用我的母語跡象工作,那麼這個問題開始。基本上在本地機器上運行時,它不能正確顯示字母。
下面是一段代碼,這是造成我發出
# -*- coding: utf-8 -*-
import datetime
print 'Content-Type: text/html'
print ''
print '<html>'
print '<head>'
print '<title>Witaj świecie</title>'
print '</head>'
print '<body>'
print '<h1>Witaj świecie</h1>'
print ''
print 'Data logowania to: %s' % (datetime.datetime.now())
print '</body>'
print '</html>'
當然我保存爲UTF-8格式的所有文件。任何人都可以告訴我如何在這裏啓用適當的utf-8字符顯示?
謝謝你的幫助!現在我覺得超級愚蠢。爲什麼我沒有想到這些顯而易見的事情...... – Mathias