By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,313 Members | 1,240 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,313 IT Pros & Developers. It's quick & easy.

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

P: n/a
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?

Expand|Select|Wrap|Line Numbers
  1. <%@ Page Language="C#" CodePage="1252" %>
  2. <html>
  3. <head>
  4. </head>
  5. <body>
  6. <form runat="server" Id="TheForm">
  7. <input type="text" runat="server" />
  8. <input type="submit" name="Go" />
  9. </form>
  10. </body>
  11. </html>
  12.  
Nov 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
CoolKiwiBloke wrote:
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,

--
http://www.joergjooss.de
mailto:ne********@joergjooss.de
Nov 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.