2 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
3 <?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
6 <name>mod_charset_lite</name>
7 <description>Specify character set translation or recoding</description>
8 <status>Experimental</status>
9 <sourcefile>mod_charset_lite.c</sourcefile>
10 <identifier>charset_lite_module</identifier>
13 <p>This is an <strong>experimental</strong> module and should
14 be used with care. Experiment with your
15 <code>mod_charset_lite</code> configuration to ensure that it
16 performs the desired function.</p>
18 <p><module>mod_charset_lite</module> allows the administrator to
19 specify the source character set of objects as well as the
20 character set they should be translated into before sending to the
21 client. <module>mod_charset_lite</module> does not translate the
22 data itself but instead tells Apache what translation to
23 perform. <module>mod_charset_lite</module> is applicable to EBCDIC
24 and ASCII host environments. In an EBCDIC environment, Apache
25 normally translates text content from the code page of the Apache
26 process locale to ISO-8859-1. <module>mod_charset_lite</module>
27 can be used to specify that a different translation is to be
28 performed. In an ASCII environment, Apache normally performs no
29 translation, so <module>mod_charset_lite</module> is needed in
30 order for any translation to take place.</p>
32 <p>This module provides a small subset of configuration
33 mechanisms implemented by Russian Apache and its associated
34 <code>mod_charset</code>.</p>
37 <section><title>Common Problems</title>
39 <section><title>Invalid character set names</title>
41 <p>The character set name parameters of <directive
42 module="mod_charset_lite">CharsetSourceEnc</directive> and
43 <directive module="mod_charset_lite">CharsetDefault</directive>
44 must be acceptable to the translation mechanism used by APR on the
45 system where <module>mod_charset_lite</module> is deployed. These
46 character set names are not standardized and are usually not the
47 same as the corresponding values used in http headers. Currently,
48 APR can only use iconv(3), so you can easily test your character
49 set names using the iconv(1) program, as follows:</p>
51 iconv -f charsetsourceenc-value -t charsetdefault-value
55 <section><title>Mismatch between character set of content and translation
58 <p>If the translation rules don't make sense for the content,
59 translation can fail in various ways, including:</p>
62 <li>The translation mechanism may return a bad return code,
63 and the connection will be aborted.</li>
65 <li>The translation mechanism may silently place special
66 characters (e.g., question marks) in the output buffer when
67 it cannot translate the input buffer.</li>
73 <name>CharsetSourceEnc</name>
74 <description>Source charset of files</description>
75 <syntax>CharsetSourceEnc <em>charset</em></syntax>
76 <contextlist><context>server config</context>
77 <context>virtual host</context><context>directory</context>
78 <context>.htaccess</context>
80 <override>FileInfo</override>
83 <p>The <directive>CharsetSourceEnc</directive> directive specifies the
84 source charset of files in the associated container.</p>
86 <p>The value of the <em>charset</em> argument must be accepted
87 as a valid character set name by the character set support in
88 APR. Generally, this means that it must be supported by
91 <example><title>example</title>
92 <Directory "/export/home/trawick/apacheinst/htdocs/convert"><br />
93 CharsetSourceEnc UTF-16BE<br />
94 CharsetDefault ISO8859-1<br />
97 <p>The character set names in this example work with the iconv
98 translation support in Solaris 8.</p>
103 <name>CharsetDefault</name>
104 <description>Charset to translate into</description>
105 <syntax>CharsetDefault <em>charset</em></syntax>
106 <contextlist><context>server config</context>
107 <context>virtual host</context><context>directory</context>
108 <context>.htaccess</context>
110 <override>FileInfo</override>
113 <p>The <directive>CharsetDefault</directive> directive specifies the
114 charset that content in the associated container should be
117 <p>The value of the <em>charset</em> argument must be accepted
118 as a valid character set name by the character set support in
119 APR. Generally, this means that it must be supported by
122 <example><title>Example</title>
123 <Directory "/export/home/trawick/apacheinst/htdocs/convert"><br />
124 CharsetSourceEnc UTF-16BE<br />
125 CharsetDefault ISO8859-1<br />
132 <name>CharsetOptions</name>
133 <description>Configures charset tranlation behavior</description>
134 <syntax>CharsetOptions <em>option</em> [<em>option</em>] ...</syntax>
135 <default>CharsetOptions DebugLevel=0
136 NoImplicitAdd</default>
137 <contextlist><context>server config</context>
138 <context>virtual host</context><context>directory</context>
139 <context>.htaccess</context>
141 <override>FileInfo</override>
144 <p>The <directive>CharsetOptions</directive> directive configures certain
145 behaviors of <module>mod_charset_lite</module>. <em>Option</em> can
149 <dt>DebugLevel=<em>n</em></dt>
151 <dd>The <code>DebugLevel</code> keyword allows you to specify
152 the level of debug messages generated by
153 <module>mod_charset_lite</module>. By default, no messages are
154 generated. This is equivalent to <code>DebugLevel=0</code>.
155 With higher numbers, more debug messages are generated, and
156 server performance will be degraded. The actual meanings of
157 the numeric values are described with the definitions of the
158 DBGLVL_ constants near the beginning of
159 <code>mod_charset_lite.c</code>.</dd>
161 <dt>ImplicitAdd | NoImplicitAdd</dt>
163 <dd>The <code>ImplicitAdd</code> keyword specifies that
164 <module>mod_charset_lite</module> should implicitly insert its
165 filter when the configuration specifies that the character
166 set of content should be translated. If the filter chain is
167 explicitly configured using the AddOutputFilter directive,
168 <code>NoImplicitAdd</code> should be specified so that
169 <module>mod_charset_lite</module> doesn't add its filter.</dd>