Mercurial > hg > nginx-site
annotate xml/en/docs/http/ngx_http_charset_module.xml @ 519:e23d718ac865
A link to CHANGES for 1.3 corrected.
author | Maxim Konovalov <maxim@nginx.com> |
---|---|
date | Mon, 21 May 2012 15:15:17 +0000 |
parents | 657848837328 |
children | 694db9597ee0 |
rev | line source |
---|---|
350
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1 <?xml version="1.0"?> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2 |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
3 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
4 |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
5 <module name="Module ngx_http_charset_module" |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
6 link="/en/docs/http/ngx_http_charset_module.html" |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
7 lang="en"> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
8 |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
9 <section id="summary"> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
10 |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
11 <para> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
12 The <literal>ngx_http_charset_module</literal> module adds the specified |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
13 charset to the <header>Content-Type</header> response header field. |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
14 In addition, the module can convert data from one charset to another, |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
15 with some limitations: |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
16 <list type="bullet"> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
17 |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
18 <listitem> |
367
f4033b9bc4ec
- Removed unnecessary instances of unbreakable space.
Ruslan Ermilov <ru@nginx.com>
parents:
351
diff
changeset
|
19 conversion is performed one way — from server to client, |
350
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
20 </listitem> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
21 |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
22 <listitem> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
23 only single-byte charsets can be converted |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
24 </listitem> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
25 |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
26 <listitem> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
27 or single-byte charsets to/from UTF-8. |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
28 </listitem> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
29 |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
30 </list> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
31 </para> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
32 |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
33 </section> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
34 |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
35 |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
36 <section id="example" name="Example Configuration"> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
37 |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
38 <para> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
39 <example> |
351
a4fa80755eab
Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents:
350
diff
changeset
|
40 include conf/koi-win; |
350
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
41 |
351
a4fa80755eab
Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents:
350
diff
changeset
|
42 charset windows-1251; |
a4fa80755eab
Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents:
350
diff
changeset
|
43 source_charset koi8-r; |
350
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
44 </example> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
45 </para> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
46 |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
47 </section> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
48 |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
49 |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
50 <section id="directives" name="Directives"> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
51 |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
52 <directive name="charset"> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
53 <syntax><value>charset</value> | <literal>off</literal></syntax> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
54 <default>off</default> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
55 <context>http</context> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
56 <context>server</context> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
57 <context>location</context> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
58 <context>if in location</context> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
59 |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
60 <para> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
61 Adds the specified charset to the <header>Content-Type</header> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
62 response header field. |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
63 If this charset is different from the charset specified |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
64 in the <link id="source_charset"/> directive, a conversion is performed. |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
65 </para> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
66 |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
67 <para> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
68 The parameter <literal>off</literal> cancels the addition of charset |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
69 to the <header>Content-Type</header> response header field. |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
70 </para> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
71 |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
72 <para> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
73 A charset can be defined with a variable: |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
74 <example> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
75 charset $charset; |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
76 </example> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
77 In such a case, all possible values of a variable need to be present |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
78 in the configuration at least once in the form of the |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
79 <link id="charset_map"/>, <link id="charset"/>, or |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
80 <link id="source_charset"/> directives. |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
81 For <literal>utf-8</literal>, <literal>windows-1251</literal>, and |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
82 <literal>koi8-r</literal> charsets it is sufficient to include the files |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
83 <path>conf/koi-win</path>, <path>conf/koi-utf</path>, and |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
84 <path>conf/win-utf</path> into configuration. |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
85 For other charsets, simply making a fictitious conversion table works, |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
86 for example: |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
87 <example> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
88 charset_map iso-8859-5 _ { } |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
89 </example> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
90 </para> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
91 |
506
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
92 <para> |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
93 In addition, charset can also be set in the |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
94 <header>X-Accel-Charset</header> response header field. |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
95 This ability can be disabled using the |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
96 <link doc="ngx_http_proxy_module.xml" id="proxy_ignore_headers"/> |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
97 and |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
98 <link doc="ngx_http_fastcgi_module.xml" id="fastcgi_ignore_headers"/> |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
99 directives. |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
100 </para> |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
101 |
350
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
102 </directive> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
103 |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
104 |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
105 <directive name="charset_map"> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
106 <syntax block="yes"><value>charset1</value> <value>charset2</value></syntax> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
107 <default/> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
108 <context>http</context> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
109 |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
110 <para> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
111 Describes the conversion table from one charset to another. |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
112 A reverse conversion table is built using the same data. |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
113 Character codes are given in hexadecimal. |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
114 Missing characters in the range 80-FF are replaced with “<literal>?</literal>”. |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
115 When converting from UTF-8, characters missing in a one-byte charset |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
116 are replaced with “<literal>&#XXXX;</literal>”. |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
117 </para> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
118 |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
119 <para> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
120 Example: |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
121 <example> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
122 charset_map koi8-r windows-1251 { |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
123 C0 FE ; # small yu |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
124 C1 E0 ; # small a |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
125 C2 E1 ; # small b |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
126 C3 F6 ; # small ts |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
127 ... |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
128 } |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
129 </example> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
130 </para> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
131 |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
132 <para> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
133 When describing a conversion table to UTF-8, codes for the UTF-8 charset should |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
134 be given in the second column, for example: |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
135 <example> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
136 charset_map koi8-r utf-8 { |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
137 C0 D18E ; # small yu |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
138 C1 D0B0 ; # small a |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
139 C2 D0B1 ; # small b |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
140 C3 D186 ; # small ts |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
141 ... |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
142 } |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
143 </example> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
144 </para> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
145 |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
146 <para> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
147 Full conversion tables from <literal>koi8-r</literal> to |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
148 <literal>windows-1251</literal>, and from <literal>koi8-r</literal> and |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
149 <literal>windows-1251</literal> to <literal>utf-8</literal> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
150 are provided in the distribution files <path>conf/koi-win</path>, |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
151 <path>conf/koi-utf</path>, and <path>conf/win-utf</path>. |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
152 </para> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
153 |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
154 </directive> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
155 |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
156 |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
157 <directive name="charset_types"> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
158 <syntax><value>mime-type</value> ...</syntax> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
159 <default>text/html text/xml text/plain text/vnd.wap.wml |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
160 application/x-javascript application/rss+xml</default> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
161 <context>http</context> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
162 <context>server</context> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
163 <context>location</context> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
164 <appeared-in>0.7.9</appeared-in> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
165 |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
166 <para> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
167 Enables module processing in responses with the specified MIME types |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
168 in addition to “<literal>text/html</literal>”. |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
169 </para> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
170 |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
171 </directive> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
172 |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
173 |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
174 <directive name="override_charset"> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
175 <syntax><literal>on</literal> | <literal>off</literal></syntax> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
176 <default>off</default> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
177 <context>http</context> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
178 <context>server</context> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
179 <context>location</context> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
180 <context>if in location</context> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
181 |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
182 <para> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
183 Determines if a conversion should be performed for answers |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
184 received from a proxied or FastCGI server, |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
185 if the answers already carry a charset in the <header>Content-Type</header> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
186 response header field. |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
187 If conversion is enabled, a charset specified in the received |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
188 response is used as a source charset. |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
189 <note> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
190 It should be noted that if a response was received in a subrequest |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
191 then conversion from the response charset to the main request charset |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
192 is always performed regardless of the <literal>override_charset</literal> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
193 directive setting. |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
194 </note> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
195 </para> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
196 |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
197 </directive> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
198 |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
199 |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
200 <directive name="source_charset"> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
201 <syntax><value>charset</value></syntax> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
202 <default/> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
203 <context>http</context> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
204 <context>server</context> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
205 <context>location</context> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
206 <context>if in location</context> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
207 |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
208 <para> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
209 Defines the source charset of a response. |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
210 If this charset is different from the charset specified |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
211 in the <link id="charset"/> directive, a conversion is performed. |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
212 </para> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
213 |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
214 </directive> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
215 |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
216 </section> |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
217 |
55c1c4a1748f
English translation of ngx_http_charset_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
218 </module> |