If I use HttpAddRequestHeadersW version and attached unicode wide string, does the server recognize the character-set? Which side is responsible for the character-set encoding conversion? Server or Client?
Asked
Active
Viewed 128 times
1 Answers
0
The wide Unicode string will first be converted by Windows to iso-8859-1 encoding. However, virtually all non-ASCII characters are disallowed, so you would have to base64 encode a UTF8 string, then do custom handling on both the client and the server to make use of it.
See this question for more details: How to send non-English unicode string using HTTP header?

Community
- 1
- 1

Jim Beveridge
- 330
- 2
- 10
-
Base64 isn't the only option, URL-escaping would work as well (`%E5` etc). The need for custom handling on both sides means that you can use any printable-ASCII encoding – MSalters Jun 01 '16 at 09:00
-
But the problem isn't just the encoding. You also need to split long lines and merge them together again. While this is obviously possible to do manually with any encoding, it's a standard feature in Base64 encode/decode engines and so it's highly likely that you'll be able to use an existing, stable library to process the header. – Jim Beveridge Jun 04 '16 at 21:06