1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
4 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
5 This file is generated from xml source: DO NOT EDIT
6 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
8 <title>mod_charset_lite - Apache HTTP Server</title>
9 <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
10 <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
11 <link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
12 <link href="../images/favicon.ico" rel="shortcut icon" /></head>
14 <div id="page-header">
15 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p>
16 <p class="apache">Apache HTTP Server Version 2.0</p>
17 <img alt="" src="../images/feather.gif" /></div>
18 <div class="up"><a href="./"><img title="<-" alt="<-" src="../images/left.gif" /></a></div>
20 <a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Server</a> > <a href="http://httpd.apache.org/docs/">Documentation</a> > <a href="../">Version 2.0</a> > <a href="./">Modules</a></div>
21 <div id="page-content">
22 <div id="preamble"><h1>Apache Module mod_charset_lite</h1>
24 <p><span>Available Languages: </span><a href="../en/mod/mod_charset_lite.html" title="English"> en </a> |
25 <a href="../ko/mod/mod_charset_lite.html" hreflang="ko" rel="alternate" title="Korean"> ko </a></p>
27 <table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Specify character set translation or recoding</td></tr>
28 <tr><th><a href="module-dict.html#Status">Status:</a></th><td>Experimental</td></tr>
29 <tr><th><a href="module-dict.html#ModuleIdentifier">Module Identifier:</a></th><td>charset_lite_module</td></tr>
30 <tr><th><a href="module-dict.html#SourceFile">Source File:</a></th><td>mod_charset_lite.c</td></tr></table>
33 <p>This is an <strong>experimental</strong> module and should
34 be used with care. Experiment with your
35 <code class="module"><a href="../mod/mod_charset_lite.html">mod_charset_lite</a></code> configuration to ensure that it
36 performs the desired function.</p>
38 <p><code class="module"><a href="../mod/mod_charset_lite.html">mod_charset_lite</a></code> allows the administrator to
39 specify the source character set of objects as well as the
40 character set they should be translated into before sending to the
41 client. <code class="module"><a href="../mod/mod_charset_lite.html">mod_charset_lite</a></code> does not translate the
42 data itself but instead tells Apache what translation to
43 perform. <code class="module"><a href="../mod/mod_charset_lite.html">mod_charset_lite</a></code> is applicable to EBCDIC
44 and ASCII host environments. In an EBCDIC environment, Apache
45 normally translates text content from the code page of the Apache
46 process locale to ISO-8859-1. <code class="module"><a href="../mod/mod_charset_lite.html">mod_charset_lite</a></code>
47 can be used to specify that a different translation is to be
48 performed. In an ASCII environment, Apache normally performs no
49 translation, so <code class="module"><a href="../mod/mod_charset_lite.html">mod_charset_lite</a></code> is needed in
50 order for any translation to take place.</p>
52 <p>This module provides a small subset of configuration
53 mechanisms implemented by Russian Apache and its associated
54 <code>mod_charset</code>.</p>
56 <div id="quickview"><h3 class="directives">Directives</h3>
58 <li><img alt="" src="../images/down.gif" /> <a href="#charsetdefault">CharsetDefault</a></li>
59 <li><img alt="" src="../images/down.gif" /> <a href="#charsetoptions">CharsetOptions</a></li>
60 <li><img alt="" src="../images/down.gif" /> <a href="#charsetsourceenc">CharsetSourceEnc</a></li>
64 <li><img alt="" src="../images/down.gif" /> <a href="#problems">Common Problems</a></li>
66 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
68 <h2><a name="problems" id="problems">Common Problems</a></h2>
70 <h3>Invalid character set names</h3>
72 <p>The character set name parameters of <code class="directive"><a href="#charsetsourceenc">CharsetSourceEnc</a></code> and
73 <code class="directive"><a href="#charsetdefault">CharsetDefault</a></code>
74 must be acceptable to the translation mechanism used by APR on the
75 system where <code class="module"><a href="../mod/mod_charset_lite.html">mod_charset_lite</a></code> is deployed. These
76 character set names are not standardized and are usually not the
77 same as the corresponding values used in http headers. Currently,
78 APR can only use iconv(3), so you can easily test your character
79 set names using the iconv(1) program, as follows:</p>
81 <div class="example"><p><code>
82 iconv -f charsetsourceenc-value -t charsetdefault-value
86 <h3>Mismatch between character set of content and translation
89 <p>If the translation rules don't make sense for the content,
90 translation can fail in various ways, including:</p>
93 <li>The translation mechanism may return a bad return code,
94 and the connection will be aborted.</li>
96 <li>The translation mechanism may silently place special
97 characters (e.g., question marks) in the output buffer when
98 it cannot translate the input buffer.</li>
102 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
103 <div class="directive-section"><h2><a name="CharsetDefault" id="CharsetDefault">CharsetDefault</a> <a name="charsetdefault" id="charsetdefault">Directive</a></h2>
104 <table class="directive">
105 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Charset to translate into</td></tr>
106 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CharsetDefault <var>charset</var></code></td></tr>
107 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
108 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
109 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Experimental</td></tr>
110 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_charset_lite</td></tr>
112 <p>The <code class="directive">CharsetDefault</code> directive specifies the
113 charset that content in the associated container should be
116 <p>The value of the <var>charset</var> argument must be accepted
117 as a valid character set name by the character set support in
118 APR. Generally, this means that it must be supported by
121 <div class="example"><h3>Example</h3><p><code>
122 <Directory /export/home/trawick/apacheinst/htdocs/convert><br />
123 <span class="indent">
124 CharsetSourceEnc UTF-16BE<br />
125 CharsetDefault ISO-8859-1<br />
131 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
132 <div class="directive-section"><h2><a name="CharsetOptions" id="CharsetOptions">CharsetOptions</a> <a name="charsetoptions" id="charsetoptions">Directive</a></h2>
133 <table class="directive">
134 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures charset translation behavior</td></tr>
135 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CharsetOptions <var>option</var> [<var>option</var>] ...</code></td></tr>
136 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>CharsetOptions DebugLevel=0 NoImplicitAdd</code></td></tr>
137 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
138 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
139 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Experimental</td></tr>
140 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_charset_lite</td></tr>
142 <p>The <code class="directive">CharsetOptions</code> directive configures certain
143 behaviors of <code class="module"><a href="../mod/mod_charset_lite.html">mod_charset_lite</a></code>. <var>Option</var> can
147 <dt><code>DebugLevel=<var>n</var></code></dt>
149 <dd>The <code>DebugLevel</code> keyword allows you to specify
150 the level of debug messages generated by
151 <code class="module"><a href="../mod/mod_charset_lite.html">mod_charset_lite</a></code>. By default, no messages are
152 generated. This is equivalent to <code>DebugLevel=0</code>.
153 With higher numbers, more debug messages are generated, and
154 server performance will be degraded. The actual meanings of
155 the numeric values are described with the definitions of the
156 DBGLVL_ constants near the beginning of
157 <code>mod_charset_lite.c</code>.</dd>
159 <dt><code>ImplicitAdd | NoImplicitAdd</code></dt>
161 <dd>The <code>ImplicitAdd</code> keyword specifies that
162 <code class="module"><a href="../mod/mod_charset_lite.html">mod_charset_lite</a></code> should implicitly insert its
163 filter when the configuration specifies that the character
164 set of content should be translated. If the filter chain is
165 explicitly configured using the <code class="directive"><a href="../mod/mod_mime.html#addoutputfilter">AddOutputFilter</a></code> directive, <code>NoImplicitAdd</code>
166 should be specified so that <code class="module"><a href="../mod/mod_charset_lite.html">mod_charset_lite</a></code>
167 doesn't add its filter.</dd>
171 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
172 <div class="directive-section"><h2><a name="CharsetSourceEnc" id="CharsetSourceEnc">CharsetSourceEnc</a> <a name="charsetsourceenc" id="charsetsourceenc">Directive</a></h2>
173 <table class="directive">
174 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Source charset of files</td></tr>
175 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CharsetSourceEnc <var>charset</var></code></td></tr>
176 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
177 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
178 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Experimental</td></tr>
179 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_charset_lite</td></tr>
181 <p>The <code class="directive">CharsetSourceEnc</code> directive specifies the
182 source charset of files in the associated container.</p>
184 <p>The value of the <var>charset</var> argument must be accepted
185 as a valid character set name by the character set support in
186 APR. Generally, this means that it must be supported by
189 <div class="example"><h3>Example</h3><p><code>
190 <Directory /export/home/trawick/apacheinst/htdocs/convert><br />
191 <span class="indent">
192 CharsetSourceEnc UTF-16BE<br />
193 CharsetDefault ISO-8859-1<br />
198 <p>The character set names in this example work with the iconv
199 translation support in Solaris 8.</p>
203 <div class="bottomlang">
204 <p><span>Available Languages: </span><a href="../en/mod/mod_charset_lite.html" title="English"> en </a> |
205 <a href="../ko/mod/mod_charset_lite.html" hreflang="ko" rel="alternate" title="Korean"> ko </a></p>
206 </div><div id="footer">
207 <p class="apache">Copyright 2009 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
208 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div>