Can nginx re-encode XML documents, or alter XML headers? Can nginx re-encode XML documents, or alter XML headers? nginx nginx

Can nginx re-encode XML documents, or alter XML headers?


Short answer, yes it can.

include win-utf;server {  listen 5080;  location /... {    proxy_pass https://mapsengine.google.com;    source_charset windows-1251;    charset        utf-8;  }}

That is:

  • source_charset specifies what you're converting from
  • charset specifies what you're converting to
  • and include win-utf brings in a file with a charset_map which does the conversion.

Only conversions between Windows 1251, UTF-8 and KOI8-R are supported out of the box.

More info: http://nginx.org/en/docs/http/ngx_http_charset_module.html