? in Miscellaneous

2 posts, 0 answers
  1. Alexander
    Alexander avatar
    1 posts
    Member since:
    Mar 2018

    Posted 01 Mar 2018 Link to this post

    I have a problem. We have app with requests header that contains symbols: Ø, ø; Æ, æ; Å, å. And when Fiddler get this request then I see error in app and see this in Inspectors in Fiddler:

    Header: stj�rdal

     

    How I can fix it?

  2. David
    David avatar
    3 posts
    Member since:
    Feb 2018

    Posted 01 Mar 2018 Link to this post

    You may be doing something that violates the HTTP specification.  Are non-ASCII characters permitted in the HTTP headers?  I think that the headers are limited to ASCII characters, but the character set of the content is determined by the Content-Type header.  Right?

    Just a wild guess:  You could try making sure that the (special) characters are written with the same character set as the Content-Type header, in both the request and the response headers.  I'm not sure if this will work, but it would be a nice experiment.

    A better solution is for you to "escape" the special characters, before they are written to the header.  You could use the standard UTF-8 "%"-encoding that is used for URL's.  For example, "Øresund" would be encoded as "%C3%98resund".  This simple encoding technique ensures that only ASCII characters are in the result, and the result can be easily decoded.

Back to Top