We are excited to announce that the IIS.NET Forums are moving to the new Microsoft Q&A experience. Learn more >

accented/non-ASCII characters é, í, ß, èRSS

13 replies

Last post Mar 19, 2013 05:15 AM by beroni

  • accented/non-ASCII characters é, í, ß, è

    Sep 25, 2008 10:33 AM|rebelde|LINK

    Hi,

    Thanks for the URL rewrite module.  I expect that it will soon be invaluable.

    Rewriting doesn't seem to work for the few accented characters that I tested.

    /résumé
    rewritten to:
    /page.aspx?q=résumé

    Request.QueryString("q") gives r?sum? 
    (note that the é has been changed to a "?")

    HTTP_X_ORIGINAL_URL looks good, showing  /résumé

    The same problem occurs for /r%C3%A9sum%C3%A9  (where the %-escaped values are given)
    None of these work either: è, ß, í

    Is there any way to get é and other accented characters rewritten correctly?
    The page is in UTF-8 encoding, if that is relevant.

    Thanks!

  • Re: accented/non-ASCII characters é, í, ß, è

    Sep 25, 2008 12:25 PM|DanielVL|LINK

    Hi,

    I don't think it's related to URL Rewrite; the encoding is relevant indeed. In IIS Manager, please go to .NET Globalization and change Encoding > Requests from utf-8 to iso-8859-1 (I think utf-7 works too, but I took iso-8859-1 from "Checklist: Securing ASP.NET")

    I'm glad to hear you like the module!

    Thanks.

    Daniel Vasquez Lopez
    IIS Team
  • Re: accented/non-ASCII characters é, í, ß, è

    Sep 25, 2008 12:30 PM|anilr|LINK

    Also, are you calling Request.QueryString from asp.net in integrated mode - if so, that is a known issue in asp.net which is fixed in .Net 3.5 SP1

    Anil Ruia
    Software Design Engineer
    IIS Core Server
  • Re: accented/non-ASCII characters é, í, ß, è

    Sep 25, 2008 03:41 PM|rebelde|LINK

    Thanks for the responses.

    I've upgraded to .Net 3.5 SP1.  The question marks have changed to empty squares, but the problem remains.  (I have no plans to even try changing Encoding > Requests from utf-8 to iso-8859-1.  The site uses UTF-8.)

    I still think it is a URL Rewrite problem.

    This works perfectly (%C3%A9 = é):

    /page.aspx?q=r%C3%A9sum%C3%A9

    This, with URL Rewrite transforming it into the above page does not work:

    /r%C3%A9sum%C3%A9
     I am thinking that it is a bug.

     

  • Re: accented/non-ASCII characters é, í, ß, è

    Sep 25, 2008 04:45 PM|DanielVL|LINK

    As another workaround, Could be possible to move your rule to the server level (global rule)? It looks that ASP.NET is not behaving correctly during the internal child request. Global rules don't have child request, so it must work fine.

    Please let me know. I follow this up with the ASP.NET team, thanks.

    Daniel Vasquez Lopez
    IIS Team
  • Re: accented/non-ASCII characters é, í, ß, è

    Sep 26, 2008 03:25 AM|rebelde|LINK

    Daniel,

    I tried applying it globally, and it still doesn't work.

    I created a simple test page (encoding UTF-8):

    <%@ Page LANGUAGE="VB" %>
    <html><head></head><body>
    <% Response.write(Request.querystring("q")) %>
    </body></html>

    If the page is /test/page.aspx:
     Rewrite pattern:

    ^test/(.*)

     Rewrite URL:

    test/page.aspx?q={R:1}

    /test/page.aspx?q=r%C3%A9sum%C3%A9 - works

    /test/r%C3%A9sum%C3%A9 - does not work

    Thanks

  • Re: accented/non-ASCII characters é, í, ß, è

    Sep 26, 2008 06:49 PM|DanielVL|LINK

    OK, this is an issue with Rewrite Module, we must encode the Query String correctly, please send me an email if this is blocking you in order to send you a fix.

    Thanks for reporting this.

    Daniel Vasquez Lopez
    IIS Team
  • Re: accented/non-ASCII characters é, í, ß, è

    Sep 29, 2008 07:20 AM|rebelde|LINK

    Email sent.

    A response from one of the developers.  That is exceptionally cool. Thank you and thanks to everybody behind this site and forums.

  • Re: accented/non-ASCII characters é, í, ß, è

    Sep 30, 2008 03:27 PM|muratmoon|LINK

     I have the same problem for turkish characters. If there is a fix could you send it to me too please?

  • Re: accented/non-ASCII characters é, í, ß, è

    Oct 07, 2008 06:00 PM|gabruu|LINK

    Hello i have the same problem here with german umlaute. I have created a topic for it http://forums.iis.net/t/1152253.aspx Is it possible that i get the fix as well ? thanks

  • Re: accented/non-ASCII characters é, í, ß, è

    Oct 10, 2008 07:08 PM|DanielVL|LINK

    You can download the fix from here:

    http://forums.iis.net/p/1152313/1881760.aspx#1881760

    Thanks!

    Daniel Vasquez Lopez
    IIS Team
  • Re: accented/non-ASCII characters é, í, ß, è

    Feb 04, 2011 06:02 PM|cmplicity|LINK

    I have the same problem, but the fix didn't work.. .:(

    Any ideas?

  • Re: accented/non-ASCII characters é, í, ß, è

    Jul 27, 2012 02:16 AM|pfgrid|LINK

    I have the problem in IIS 7.5 - how can I fix it?
    PFGrid
    www.pfgrid.com
  • Re: accented/non-ASCII characters é, í, ß, è

    Mar 19, 2013 05:15 AM|beroni|LINK

    Hello,

    I have the same problem with spanish accents. I use correct UTF-8 links for create the URL.

    Thanks.