mhammond / pywin32

Python for Windows (pywin32) Extensions
5.06k stars 796 forks source link

ASP script with high-characters causes 500 Server Error #169

Open ghost opened 19 years ago

ghost commented 19 years ago

Example VB Script works okay:

<% Response.Write( "é!" ) %>

Equivalent Python script fails with a 500 Server error:

<%@language=Python%> <% Response.Write( "é!" ) %>

An altered, but equivalent, Python script works fine:

<%@language=Python%> <% Response.Write( "\xe9!" ) %>

This problem cropped up in the last year or so. I don't know if it's an IIS 6 issue or a Python 2.3 issue. I'm using Python 2.3.4 with pywin32 build 202.

I'm suspect it has something to do with the encoding of the script code that is passed to Python and its ActiveX Scripting Engine and the way the engine decodes (or doesn't) the script for evaluation.

Is this something that should be addressed in the ActiveX Scripting engine or something that just needs a specifier for the encoding (either in the ASP declaration or a coding declaration in the Python script)?

Any suggestions?

Reported by: jaraco

Original Ticket: "pywin32/bugs/169":https://sourceforge.net/p/pywin32/bugs/169

Avasam commented 7 months ago

Tagging @jaraco as the original SourceForge issue creator.