Re: Unicode in cgi-script with apache2

2014-08-17 Thread Dominique Ramaekers
t-Length', str(len(output)))] start_response(status, response_headers) return [output] Gives in the browser as output: Hello World! é ü à ũ And if I check the encoding with the python script (uncommenting line #1), I still get ANSI_X3.4-1968 This is really getting on my nerves. Op

Re: Unicode in cgi-script with apache2

2014-08-17 Thread Dominique Ramaekers
Yes, even a restart not just reload. I Also put it in the section as in the main apache2.conf Op 17-08-14 om 13:04 schreef Peter Otten: Dominique Ramaekers wrote: Putting the lines in my apache config: AddDefaultCharset UTF-8 SetEnv PYTHONIOENCODING utf-8 Cleared my brower-cache... No

Re: Unicode in cgi-script with apache2

2014-08-17 Thread Dominique Ramaekers
Wow, everybody keeps on chewing on this problem. As a bonus, I've reconfigured my server to do some testings. http://cloudserver.ramaekers-stassart.be/test.html => is the file I want to read. Going to this url displays the file... http://cloudserver.ramaekers-stassart.be/cgi-python/encoding1 => i

Re: Unicode in cgi-script with apache2

2014-08-16 Thread Dominique Ramaekers
re Windows is better in encoding issues :P +1 for Microsoft... I think that Apache (*nix versions) doesn't tell Python, she's accepting UTF-8. Or Python doesn't listen right... Maybe I should place a bug report in both projects? Op 17-08-14 om 04:50 schreef Denis McMahon:

Re: Unicode in cgi-script with apache2

2014-08-16 Thread Dominique Ramaekers
evious message. Thanks anyway. grz Op 16-08-14 om 18:40 schreef Denis McMahon: On Fri, 15 Aug 2014 20:10:25 +0200, Dominique Ramaekers wrote: #!/usr/bin/env python3 print("Content-Type: text/html") print("Cache-Control: no-cache, must-revalidate")# HTTP/1.1 print("

Re: Unicode in cgi-script with apache2

2014-08-16 Thread Dominique Ramaekers
Op 16-08-14 om 13:17 schreef Peter Otten: Dominique Ramaekers wrote: I've got a little script: #!/usr/bin/env python3 print("Content-Type: text/html") print("Cache-Control: no-cache, must-revalidate")# HTTP/1.1 print("Expires: Sat, 26 Jul 1997 05:00:00 GMT&quo

Re: Unicode in cgi-script with apache2

2014-08-16 Thread Dominique Ramaekers
eef John Gordon: In Dominique Ramaekers writes: #!/usr/bin/env python3 print("Content-Type: text/html") print("Cache-Control: no-cache, must-revalidate")# HTTP/1.1 print("Expires: Sat, 26 Jul 1997 05:00:00 GMT") # Date in the past print("")

Re: Unicode in cgi-script with apache2

2014-08-16 Thread Dominique Ramaekers
ython (in apache)... So I'll use wsgi, It's a little more work but it seems really neat... grtz Op 15-08-14 om 21:27 schreef alister: On Fri, 15 Aug 2014 20:10:25 +0200, Dominique Ramaekers wrote: Hi, I've got a little script: #!/usr/bin/env python3 print("Content-Ty

Unicode in cgi-script with apache2

2014-08-15 Thread Dominique Ramaekers
Hi, I've got a little script: #!/usr/bin/env python3 print("Content-Type: text/html") print("Cache-Control: no-cache, must-revalidate")# HTTP/1.1 print("Expires: Sat, 26 Jul 1997 05:00:00 GMT") # Date in the past print("") f = open("/var/www/cgi-data/index.html", "r") for line in f: prin