what is wrong in my code?? (python 3.3)

dream4soul at gmail.com dream4soul at gmail.com
Mon Sep 30 10:17:11 EDT 2013


On Friday, September 27, 2013 7:19:45 PM UTC+3, Denis McMahon wrote:
> On Fri, 27 Sep 2013 06:54:48 -0700, dream4soul wrote:
> 
> 
> 
> > #!c:/Python33/python.exe -u
> 
> > import os, sys 
> 
> > print("Content-type: text/html; charset=utf-8\n\n")
> 
> > print ('Hello, world!<hr>')
> 
> > print('ранее предусматривалась смертная казнь.')
> 
> 
> 
> > I see only first print, second it just question marks in my browser(code
> 
> > edited in notepad++ with UTF-8 encode). what is wrong??
> 
> 
> 
> Sounds like your browser is ignoring the charset. Can you force the 
> 
> browser to utf-8?
> 
> 
> 
> What happens if you create a plain html file with the same content and 
> 
> send it to your browser?
> 
> 
> 
> eg: test.html:
> 
> -----------------
> 
> Hello, world!<hr>
> 
> ранее предусматривалась смертная казнь.
> 
> -----------------
> 
> 
> 
> This really doesn't look like a python issue (again).
> 
> 
> 
> -- 
> 
> Denis McMahon, denismfmcmahon at gmail.com

I rename file from test.py in test.txt and all works fine. So clearly problem it is not in file coding or browser. ANY IDEAS??



More information about the Python-list mailing list