Discussion:
Can HTTP headers be in unicode ?
(too old to reply)
Polaris
2004-11-25 10:31:10 UTC
Permalink
Hi:

Is it possible for Http header be in the format of unicode (wide char) ?

Thanks in advance for your info.

Polaris
Stephen Sulzer
2004-11-25 11:37:36 UTC
Permalink
I do not think so. The HTTP specification uses the RFC 822 standard for the
format of HTTP headers, which specifies that they be in 7-bit ASCII format.
WinInet and WinHTTP, for example, would not accept wide-char Unicode
characters in HTTP headers. The one exception is the request-line of the
HTTP request (e.g., "GET /URL-path/resource-name?optional-query-string
HTTP/1.1"). WinInet and WinHTTP can encode and transmit the URL in escaped
UTF-8 format (which is not a wide-char format) if it contains non 7-bit
ASCII or other "unsafe" characters.

This is all unrelated to the fact that the WinInet/WinHTTP APIs for reading
and writing HTTP headers are Unicode APIs (WinInet also implements ANSI
versions).

Stephen
Polaris
2004-11-29 18:21:56 UTC
Permalink
Thank you very much Sir!
Post by Stephen Sulzer
I do not think so. The HTTP specification uses the RFC 822 standard for the
format of HTTP headers, which specifies that they be in 7-bit ASCII format.
WinInet and WinHTTP, for example, would not accept wide-char Unicode
characters in HTTP headers. The one exception is the request-line of the
HTTP request (e.g., "GET /URL-path/resource-name?optional-query-string
HTTP/1.1"). WinInet and WinHTTP can encode and transmit the URL in escaped
UTF-8 format (which is not a wide-char format) if it contains non 7-bit
ASCII or other "unsafe" characters.
This is all unrelated to the fact that the WinInet/WinHTTP APIs for reading
and writing HTTP headers are Unicode APIs (WinInet also implements ANSI
versions).
Stephen
Loading...