unicode – Helicon Tech Blog http://www.helicontech.com/articles Web Server Enhancements Thu, 15 Jul 2010 15:12:05 +0000 en-US hourly 1 https://wordpress.org/?v=5.2.4 Subtleties of Unicode transformation in IIS6 http://www.helicontech.com/articles/subtleties-of-unicode-transformation-in-iis6/ Mon, 08 Dec 2008 11:10:00 +0000 http://localhost:85/blog/?p=12 Continue reading ]]> Today we want to give you a brief info on what and how is being encoded in IIS6.

When IIS gets a request (e.g. GET /smth), each Unicode character of “smth” should be encoded as %xx in UTF-8 (in our case: GET /%73%6d%74%68).

However, IIS also recognizes non-encoded Unicode (UTF-8, UTF-16, etc.) text (e.g. GET /Şмŧĥ) which it will then convert to UTF-8 equivalent.

In it’s turn native encoding for Windows API is UTF-16, thus the request is encoded once again (from UTF-8 to UTF-16). That’s why ISAPI module also operates with UTF-16.

To return result to IIS rewritten request should be encoded back to UTF-8 and escaped as %xx because ISAPI does not provide native Unicode API.

]]>