These modules are all compiled into Nginx by default unless a module is manually specified to be excluded in configure.
This module adds a character encoding to the Content-type field in the answer header. In addition, this module can encode the data and can only be encoded in one way, that is, from the server to the client. Configuration instance:
CharSet Windows-1251;source_charset Koi8-r;
Instructions
CharSet
Syntax: CharSet Encoding|off Default value: CharSet off Using fields: HTTP, server, location, location if field This directive causes the "Content-type" field in the answer header to use the specified encoding set, and if the character set is not the same as the set of the source_charset instruction, the character set is encoded, and the argument off indicates that "Content-type" information is not added to the answer header.
Charset_map
Syntax: Charset_map encoding1 encoding2 {...} Default value: No Working with fields: HTTP, server, location CHARSET_MAP specifies an encoding conversion table and creates a reverse conversion table with the code in hexadecimal, and if there is no code recorded in the 80-FF scope, they are marked as "? ”。 The following example:
Convert Koi8-r to Windows-1251 's full conversion table as Conf/koi-win.
Override_charset
Syntax: Override_charset on|off Default value: Override_charset off Using fields: HTTP, server, location, location fields in if parameter specifies that the "Content-type" field exists in the answer header obtained on the proxy server or on the FASTCGI server, and the encoding conversion is enabled for the answer, and if encoding conversion is allowed, it is initialized with the encoding specified in the answer header. Note If an answer is taken in a subquery, the encoding in the answer is always converted to the underlying encoding, not dependent on the override_charset instruction.
Source_charset
Syntax: Source_charset encoding Default value: No Using fields: HTTP, server, location, location fields in if parameter specifies the initial code in the answer, and if this parameter is different from the CharSet directive, the encoding conversion is enabled.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.