Mercurial > hg > nginx-site
annotate xml/ru/docs/http/ngx_http_charset_module.xml @ 1559:d876f94135ac
Added info about limiting access to status.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Mon, 07 Sep 2015 09:06:49 +0300 |
parents | 9264fdb6c833 |
children | 4cafd82e5007 |
rev | line source |
---|---|
222
bfe3eff81d04
Removed redundant encoding specification.
Ruslan Ermilov <ru@nginx.com>
parents:
206
diff
changeset
|
1 <?xml version="1.0"?> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2 |
580
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
546
diff
changeset
|
3 <!-- |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
546
diff
changeset
|
4 Copyright (C) Igor Sysoev |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
546
diff
changeset
|
5 Copyright (C) Nginx, Inc. |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
546
diff
changeset
|
6 --> |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
546
diff
changeset
|
7 |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
8 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
9 |
349 | 10 <module name="Модуль ngx_http_charset_module" |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
11 link="/ru/docs/http/ngx_http_charset_module.html" |
589 | 12 lang="ru" |
1194 | 13 rev="4"> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
14 |
110
40eec261c2a6
Added proper support for anonymous sections, notably for the summary.
Ruslan Ermilov <ru@nginx.com>
parents:
108
diff
changeset
|
15 <section id="summary"> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
16 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
17 <para> |
349 | 18 Модуль <literal>ngx_http_charset_module</literal> добавляет указанную |
19 кодировку в поле <header>Content-Type</header> заголовка ответа. | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
20 Кроме того, модуль может перекодировать данные из одной кодировки в другую |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
21 с некоторыми ограничениями: |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
22 <list type="bullet"> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
23 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
24 <listitem> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
25 перекодирование осуществляется только в одну сторону — от сервера к клиенту, |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
26 </listitem> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
27 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
28 <listitem> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
29 перекодироваться могут только однобайтные кодировки |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
30 </listitem> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
31 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
32 <listitem> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
33 или однобайтные кодировки в UTF-8 и обратно. |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
34 </listitem> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
35 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
36 </list> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
37 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
38 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
39 </section> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
40 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
41 |
349 | 42 <section id="example" name="Пример конфигурации"> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
43 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
44 <para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
45 <example> |
351
a4fa80755eab
Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents:
349
diff
changeset
|
46 include conf/koi-win; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
47 |
351
a4fa80755eab
Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents:
349
diff
changeset
|
48 charset windows-1251; |
a4fa80755eab
Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents:
349
diff
changeset
|
49 source_charset koi8-r; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
50 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
51 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
52 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
53 </section> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
54 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
55 |
349 | 56 <section id="directives" name="Директивы"> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
57 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
58 <directive name="charset"> |
271 | 59 <syntax><value>кодировка</value> | <literal>off</literal></syntax> |
102
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
99
diff
changeset
|
60 <default>off</default> |
349 | 61 <context>http</context> |
62 <context>server</context> | |
63 <context>location</context> | |
64 <context>if в location</context> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
65 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
66 <para> |
349 | 67 Добавляет указанную кодировку в поле <header>Content-Type</header> |
68 заголовка ответа. | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
69 Если эта кодировка отличается от указанной в директиве |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
70 <link id="source_charset"/>, то выполняется перекодирование. |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
71 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
72 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
73 <para> |
349 | 74 Параметр <literal>off</literal> отменяет добавление кодировки |
75 в поле <header>Content-Type</header> заголовка ответа. | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
76 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
77 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
78 <para> |
349 | 79 Кодировка может быть задана с помощью переменной: |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
80 <example> |
349 | 81 charset $charset; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
82 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
83 В этом случае необходимо, чтобы все возможные значения переменной |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
84 присутствовали хотя бы один раз в любом месте конфигурации в виде |
349 | 85 директив <link id="charset_map"/>, <link id="charset"/> или |
86 <link id="source_charset"/>. | |
87 Для кодировок <literal>utf-8</literal>, <literal>windows-1251</literal> | |
88 и <literal>koi8-r</literal> для этого достаточно включить в конфигурацию | |
89 файлы <path>conf/koi-win</path>, <path>conf/koi-utf</path> и | |
90 <path>conf/win-utf</path>. | |
285 | 91 Для других кодировок можно просто сделать фиктивную таблицу перекодировки, |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
92 например: |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
93 <example> |
349 | 94 charset_map iso-8859-5 _ { } |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
95 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
96 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
97 |
506
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
351
diff
changeset
|
98 <para> |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
351
diff
changeset
|
99 Кроме того, кодировка может быть задана в поле <header>X-Accel-Charset</header> |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
351
diff
changeset
|
100 заголовка ответа. |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
351
diff
changeset
|
101 Эту возможность можно запретить с помощью директив |
1181 | 102 <link doc="ngx_http_proxy_module.xml" id="proxy_ignore_headers"/>, |
1194 | 103 <link doc="ngx_http_fastcgi_module.xml" id="fastcgi_ignore_headers"/>, |
104 <link doc="ngx_http_uwsgi_module.xml" id="uwsgi_ignore_headers"/> | |
506
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
351
diff
changeset
|
105 и |
1181 | 106 <link doc="ngx_http_scgi_module.xml" id="scgi_ignore_headers"/>. |
506
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
351
diff
changeset
|
107 </para> |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
351
diff
changeset
|
108 |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
109 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
110 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
111 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
112 <directive name="charset_map"> |
271 | 113 <syntax block="yes"><value>кодировка1</value> <value>кодировка2</value></syntax> |
99
1d315ef37215
The case <default/> is now language-agnostic.
Ruslan Ermilov <ru@nginx.com>
parents:
76
diff
changeset
|
114 <default/> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
115 <context>http</context> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
116 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
117 <para> |
349 | 118 Описывает таблицу перекодирования из одной кодировки в другую. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
119 Таблица для обратного перекодирования строится на основании тех же данных. |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
120 Коды символов задаются в шестнадцатеричном виде. |
349 | 121 Неописанные символы в пределах 80-FF заменяются на “<literal>?</literal>”. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
122 При перекодировании из UTF-8 символы, отсутствующие в однобайтной кодировке, |
349 | 123 заменяются на “<literal>&#XXXX;</literal>”. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
124 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
125 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
126 <para> |
349 | 127 Пример: |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
128 <example> |
349 | 129 charset_map koi8-r windows-1251 { |
130 C0 FE ; # small yu | |
131 C1 E0 ; # small a | |
132 C2 E1 ; # small b | |
133 C3 F6 ; # small ts | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
134 ... |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
135 } |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
136 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
137 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
138 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
139 <para> |
349 | 140 При описании таблицы перекодирования в UTF-8, коды кодировки UTF-8 должны |
141 быть указаны во второй колонке, например: | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
142 <example> |
349 | 143 charset_map koi8-r utf-8 { |
144 C0 D18E ; # small yu | |
145 C1 D0B0 ; # small a | |
146 C2 D0B1 ; # small b | |
147 C3 D186 ; # small ts | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
148 ... |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
149 } |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
150 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
151 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
152 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
153 <para> |
349 | 154 Полные таблицы преобразования из <literal>koi8-r</literal> в |
155 <literal>windows-1251</literal> и из <literal>koi8-r</literal> и | |
156 <literal>windows-1251</literal> в <literal>utf-8</literal> | |
157 входят в дистрибутив и находятся в файлах <path>conf/koi-win</path>, | |
158 <path>conf/koi-utf</path> и <path>conf/win-utf</path>. | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
159 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
160 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
161 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
162 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
163 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
164 <directive name="charset_types"> |
271 | 165 <syntax><value>mime-тип</value> ...</syntax> |
102
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
99
diff
changeset
|
166 <default>text/html text/xml text/plain text/vnd.wap.wml |
952
417dc982362e
Updated default for the "charset_types" directive.
Valentin Bartenev <vbart@nginx.com>
parents:
589
diff
changeset
|
167 application/javascript application/rss+xml</default> |
349 | 168 <context>http</context> |
169 <context>server</context> | |
170 <context>location</context> | |
171 <appeared-in>0.7.9</appeared-in> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
172 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
173 <para> |
349 | 174 Разрешает работу модуля в ответах с указанными MIME-типами |
175 в дополнение к “<literal>text/html</literal>”. | |
546
694db9597ee0
Documented the special value "*" in various "*_type" directives.
Ruslan Ermilov <ru@nginx.com>
parents:
506
diff
changeset
|
176 Специальное значение “<literal>*</literal>” соответствует любому MIME-типу |
694db9597ee0
Documented the special value "*" in various "*_type" directives.
Ruslan Ermilov <ru@nginx.com>
parents:
506
diff
changeset
|
177 (0.8.29). |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
178 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
179 |
952
417dc982362e
Updated default for the "charset_types" directive.
Valentin Bartenev <vbart@nginx.com>
parents:
589
diff
changeset
|
180 <para> |
417dc982362e
Updated default for the "charset_types" directive.
Valentin Bartenev <vbart@nginx.com>
parents:
589
diff
changeset
|
181 <note> |
417dc982362e
Updated default for the "charset_types" directive.
Valentin Bartenev <vbart@nginx.com>
parents:
589
diff
changeset
|
182 До версии 1.5.4 по умолчанию вместо MIME-типа |
417dc982362e
Updated default for the "charset_types" directive.
Valentin Bartenev <vbart@nginx.com>
parents:
589
diff
changeset
|
183 “<literal>application/javascript</literal>” использовался |
417dc982362e
Updated default for the "charset_types" directive.
Valentin Bartenev <vbart@nginx.com>
parents:
589
diff
changeset
|
184 “<literal>application/x-javascript</literal>”. |
417dc982362e
Updated default for the "charset_types" directive.
Valentin Bartenev <vbart@nginx.com>
parents:
589
diff
changeset
|
185 </note> |
417dc982362e
Updated default for the "charset_types" directive.
Valentin Bartenev <vbart@nginx.com>
parents:
589
diff
changeset
|
186 </para> |
417dc982362e
Updated default for the "charset_types" directive.
Valentin Bartenev <vbart@nginx.com>
parents:
589
diff
changeset
|
187 |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
188 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
189 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
190 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
191 <directive name="override_charset"> |
271 | 192 <syntax><literal>on</literal> | <literal>off</literal></syntax> |
102
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
99
diff
changeset
|
193 <default>off</default> |
349 | 194 <context>http</context> |
195 <context>server</context> | |
196 <context>location</context> | |
197 <context>if в location</context> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
198 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
199 <para> |
349 | 200 Определяет, выполнять ли перекодирование для ответов, |
1194 | 201 полученных от проксированного сервера или от FastCGI/uwsgi/SCGI-сервера, |
349 | 202 если в ответах уже указана кодировка в поле <header>Content-Type</header> |
203 заголовка ответа. | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
204 Если перекодирование разрешено, то в качестве исходной кодировки |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
205 используется кодировка, указанная в полученном ответе. |
349 | 206 <note> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
207 Необходимо отметить, что если ответ был получен в подзапросе, |
349 | 208 то, независимо от значения директивы <literal>override_charset</literal>, |
209 всегда выполняется перекодирование из кодировки ответа в кодировку | |
210 основного запроса. | |
211 </note> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
212 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
213 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
214 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
215 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
216 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
217 <directive name="source_charset"> |
102
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
99
diff
changeset
|
218 <syntax><value>кодировка</value></syntax> |
99
1d315ef37215
The case <default/> is now language-agnostic.
Ruslan Ermilov <ru@nginx.com>
parents:
76
diff
changeset
|
219 <default/> |
349 | 220 <context>http</context> |
221 <context>server</context> | |
222 <context>location</context> | |
223 <context>if в location</context> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
224 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
225 <para> |
349 | 226 Задаёт исходную кодировку ответа. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
227 Если эта кодировка отличается от указанной в директиве |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
228 <link id="charset"/>, то выполняется перекодирование. |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
229 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
230 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
231 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
232 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
233 </section> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
234 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
235 </module> |