Set python procedure character as Unicode as below:The last thing is let quixote tell browser that the coming content should be encoded as UTF-8. Before return the content in function, add code "get_response().set_content_type("text/html", charset="utf-8")". In order to use get_resonse(), "from quixote import get_response" first.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
Set editor (Vim) as Unicode, add "set encoding=utf-8" in _vimrc.
No comments:
Post a Comment