Найти - Пользователи
Полная версия: python apache utf-8
Начало » Python для новичков » python apache utf-8
1
astatium135
Имеется код:
#!/usr/bin/python
import sys
print("Content-type: text/html; charset=utf-8\n")
print("<html><body><h1>Hello,World! Приветствую!</h1>")
print("<h2>",sys.stdout.encoding,"</h2></body></html>")
и .htaccess
Options +ExecCGI
DirectoryIndex index.py
AddDefaultCharset Off
Результат:
<html><body><h1>Hello,World! �����������!</h1>
<h2> cp1251 </h2></body></html>
Подскажите, пожалуйста, что поменять, чтобы получить
<html><body><h1>Hello,World! Приветствую!</h1>
<h2> utf-8 </h2></body></html>

Версия Питона 3.4

Использование utf-8 принципиально важно.
FishHook
Версия питона какая?
astatium135
FishHook
Версия питона какая?
Версия Питона 3.4. Уточнил
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB