Module ngx_http_charset_module | english русский 简体中文 עברית 日本語 türkçe news about download security advisories documentation pgp keys faq links books support donation trac wiki nginx.com | ||||||||||||||||||||||||||||||
The
Example Configuration
include conf/koi-win; charset windows-1251; source_charset koi8-r;
Directives
Adds the specified charset to the “Content-Type” response header field. If this charset is different from the charset specified in the source_charset directive, a conversion is performed.
The parameter A charset can be defined with a variable: charset $charset;
In such a case, all possible values of a variable need to be present
in the configuration at least once in the form of the
charset_map, charset, or
source_charset directives.
For charset_map iso-8859-5 _ { }
In addition, charset can also be set in the “X-Accel-Charset” response header field. This ability can be disabled using the proxy_ignore_headers and fastcgi_ignore_headers directives.
Describes the conversion table from one charset to another.
A reverse conversion table is built using the same data.
Character codes are given in hexadecimal.
Missing characters in the range 80-FF are replaced with “ Example: charset_map koi8-r windows-1251 { C0 FE ; # small yu C1 E0 ; # small a C2 E1 ; # small b C3 F6 ; # small ts ... }
When describing a conversion table to UTF-8, codes for the UTF-8 charset should be given in the second column, for example: charset_map koi8-r utf-8 { C0 D18E ; # small yu C1 D0B0 ; # small a C2 D0B1 ; # small b C3 D186 ; # small ts ... }
Full conversion tables from
This directive appeared in version 0.7.9.
Enables module processing in responses with the specified MIME types
in addition to “
Determines if a conversion should be performed for answers received from a proxied or FastCGI server, if the answers already carry a charset in the “Content-Type” response header field. If conversion is enabled, a charset specified in the received response is used as a source charset.
It should be noted that if a response was received in a subrequest
then conversion from the response charset to the main request charset
is always performed regardless of the
Defines the source charset of a response. If this charset is different from the charset specified in the charset directive, a conversion is performed. |