Changing filenames from Greeklish => Greek (subprocess complain)

Νικόλαος Κούρας nikos.gr33k at gmail.com
Tue Jun 4 04:05:11 EDT 2013


Τη Τρίτη, 4 Ιουνίου 2013 10:35:31 π.μ. UTC+3, ο χρήστης Chris Angelico έγραψε:

> > I can't believe Chrome which by default uses 'utf-8' choosed 'iso-8859-1' to present the filenames.

> What do you mean, "by default uses UTF-8"? Chrome uses whatever it's
> told. In this case, you have no encoding specified in the page, and
> your HTTP headers include:

> Content-Type:text/html;charset=ISO-8859-1

>From where do you see this Chris?
I have an encoding specified in every cgi script i use by stating this command:

print( '''Content-type: text/html; charset=utf-8\n''' )

( That is a browser directive to display python script's output using 'utf-8' charset, that is why i wonder where you Nobody see greek-iso)


and also i'm using this:


sys.stdout = codecs.getwriter("utf-8")(sys.stdout.detach())

(not sure what exactly it does though, but if i remove it from my cgi scipts no python3 script runs, they are all die prematurely)






More information about the Python-list mailing list