literal accented characters in python asp page with Microsoft IIS
nicolas_riesch
nicolas.riesch at genevoise.ch
Tue Aug 23 02:36:03 EDT 2005
I try to use python as the language in an asp page with Microsoft IIS
5.0.
I have these two files, req_bad.asp and req_ok.asp
---------- req_bad.asp ---------
<%@LANGUAGE=Python%>
<%
# il y a un problème ici
Response.write('Hello')
%>
-----------------------------
---------- req_ok.asp ---------
<%@LANGUAGE=Python%>
<%
# il y a un probleme ici
Response.write('Hello')
%>
-----------------------------
When I retrieve req_bad.asp from a browser, I get the error message:
HTTP/1.1 500 Server Error
When I try with req_ok.asp, it works and displays 'hello'.
The only difference is that in req_bad.asp, I use an accented character
in the french word "problème".
In req_ok.asp, there is no accented character.
Someone knows how to write literal accented characters in a python asp
page ?
It is not only for the comments, but also to write out strings with
Response.write('problème')
which doesn't work either.
If I write "probl\xe8me" instead of "problème", it works well.
But as I already have lots of code containing literal accented
characters, I would have liked to be able to use them in asp pages,
without modifying them.
It is only in asp pages that things don't work.
If I run code containing literal accented characters as normal Python
program, it works.
Is the problem related to IIS and is there some configuration to change
to make it work ?
More information about the Python-list
mailing list