For HTML5 and Python CGI:
If I write UTF-8 Meta Tag, my code doesn\'t work. If I don\'t write, it works.
Page encoding is UTF-8.
print(\"Con
From https://ru.stackoverflow.com/a/352838/11350
First dont forget to set encoding in file
#!/usr/bin/env python
# -*- coding: utf-8 -*-
Then try
import sys
import codecs
sys.stdout = codecs.getwriter("utf-8")(sys.stdout.detach())
Or if you use apache2, add to your conf.
AddDefaultCharset UTF-8
SetEnv PYTHONIOENCODING utf8