Gerir os cookies que são utilizados para publicidade, como a personalização de anúncios, o remarketing e a análise de desempenho de anúncios.
2.4.3.23. Python script does not output Cyrillic
If the Python script does not output lines containing Cyrillic characters, make changes to it and format the output similarly to the examples provided below.
Example of Python 2 script
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
# enable debugging
import cgitb
cgitb.enable()
print "Content-Type: text/html;charset=utf-8"
print
print "Привет, Мир!"
Example of Python 3 script
#!/usr/bin/python3
# -*- coding: UTF-8 -*-
# enable debugging
import cgitb
cgitb.enable()
import sys
import codecs
sys.stdout = codecs.getwriter("utf-8")(sys.stdout.detach())
print("Content-Type: text/html; charset=utf-8")
print()
print('Привет, мир!')
(1)