URL Escape Character Problem (Bug in ASP.NET??)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

When attempting to use characters above 0x8F in the QueryString (URL Escaped
of course) these do not work when the CodePage is set to 1252 e.g. using
test.aspx?test=%a3, ('£') the parameter 'test' shows up in trace.axd as being
empty!

A similar problem exists when entering characters into an input box (see
code below) and then pressing submit e.g. '£' & '€'

Removing the CodePage setting (which I guess uses UTF-8 by default) does
solve the problem... however my system (which worked perfectly in traditional
ASP!!) requires CodePage 1252 to work correctly.

Is this a known problem? Is there anyway to work around this problem?

Code:
<%@ Page Language="C#" CodePage="1252" %>
<html>
<head>
</head>
<body>
<form runat="server" Id="TheForm">
<input type="text" runat="server" />
<input type="submit" name="Go" />
</form>
</body>
</html>
 
CoolKiwiBloke said:
When attempting to use characters above 0x8F in the QueryString (URL
Escaped of course) these do not work when the CodePage is set to 1252
e.g. using test.aspx?test=%a3, ('£') the parameter 'test' shows up
in trace.axd as being empty!

A similar problem exists when entering characters into an input box
(see code below) and then pressing submit e.g. '£' & '€'

Removing the CodePage setting (which I guess uses UTF-8 by default)
does solve the problem... however my system (which worked perfectly
in traditional ASP!!) requires CodePage 1252 to work correctly.

The default *runtime* character encoding in ASP.NET is UTF-8. This is
configured in web.config in the <globalization/> XML node.

Cheers,
 
Back
Top