This is a migrated thread and some comments may be shown as answers.

? in Miscellaneous

1 Answer 512 Views
Extensions and Customization
This is a migrated thread and some comments may be shown as answers.
Alexander
Top achievements
Rank 1
Alexander asked on 01 Mar 2018, 11:35 AM

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

Header: �rdal

 

How fix it?

1 Answer, 1 is accepted

Sort by
0
David
Top achievements
Rank 1
answered on 01 Mar 2018, 07:28 PM

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.

Tags
Extensions and Customization
Asked by
Alexander
Top achievements
Rank 1
Answers by
David
Top achievements
Rank 1
Share this question
or