mod_charset_lite.html revision 2eaf662cbc81e823e8d9aeb8d54e69e63032493e
615N/A<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
615N/A "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
615N/A
615N/A<html xmlns="http://www.w3.org/1999/xhtml">
615N/A <head>
615N/A <meta name="generator" content="HTML Tidy, see www.w3.org" />
615N/A
615N/A <title>Apache module mod_charset_lite</title>
615N/A </head>
615N/A <!-- Background white, links blue (unvisited), navy (visited), red (active) -->
615N/A
615N/A <body bgcolor="#FFFFFF" text="#000000" link="#0000FF"
615N/A vlink="#000080" alink="#FF0000">
615N/A <!--#include virtual="header.html" -->
615N/A
615N/A <h1 align="CENTER">Module mod_charset_lite</h1>
615N/A
615N/A <p>This module provides the ability to specify character set
615N/A translation or recoding.</p>
615N/A
615N/A <p><a href="module-dict.html#Status"
615N/A rel="Help"><strong>Status:</strong></a> Experimental<br />
615N/A <a href="module-dict.html#SourceFile"
615N/A rel="Help"><strong>Source File:</strong></a>
615N/A mod_charset_lite.c<br />
615N/A <a href="module-dict.html#ModuleIdentifier"
615N/A rel="Help"><strong>Module Identifier:</strong></a>
617N/A charset_lite_module</p>
615N/A
617N/A <h2>Summary</h2>
617N/A
617N/A <p>This is an <strong>experimental</strong> module and should
617N/A be used with care. Experiment with your
615N/A <code>mod_charset_lite</code> configuration to ensure that it
615N/A performs the desired function.</p>
615N/A
615N/A <p><code>mod_charset_lite</code> allows the administrator to
615N/A specify the source character set of objects as well as the
615N/A character set they should be translated into before sending to
615N/A the client. <code>mod_charset_lite</code> does not translate
615N/A the data itself but instead tells Apache what translation to
615N/A perform. <code>mod_charset_lite</code> is applicable to EBCDIC
615N/A and ASCII host environments. In an EBCDIC environment, Apache
615N/A normally translates text content from the code page of the
615N/A Apache process locale to ISO-8859-1.
615N/A <code>mod_charset_lite</code> can be used to specify that a
615N/A different translation is to be performed. In an ASCII
615N/A environment, Apache normally performs no translation, so
615N/A <code>mod_charset_lite</code> is needed in order for any
615N/A translation to take place.</p>
615N/A
615N/A <p>This module will only work if <code>APACHE_XLATE</code> is
615N/A defined at compile time.</p>
615N/A
615N/A <p>This module provides a small subset of configuration
615N/A mechanisms implemented by Russian Apache and its associated
615N/A <code>mod_charset</code>.</p>
615N/A
615N/A <h2>Directives</h2>
615N/A
615N/A <ul>
615N/A <li><a href="#charsetsourceenc">CharsetSourceEnc</a></li>
615N/A
615N/A <li><a href="#charsetdefault">CharsetDefault</a></li>
615N/A
615N/A <li><a href="#charsetoptions">CharsetOptions</a></li>
615N/A </ul>
615N/A
615N/A <h2>Common Problems</h2>
615N/A
615N/A <h3>Invalid character set names</h3>
615N/A
615N/A <p>The character set name parameters of CharsetSourceEnc and
615N/A CharsetDefault must be acceptable to the translation mechanism
615N/A used by APR on the system where mod_charset_lite is deployed.
615N/A These character set names are not standardized and are usually
615N/A not the same as the corresponding values used in http headers.
615N/A Currently, APR can only use iconv(3), so you can easily test
615N/A your character set names using the iconv(1) program, as
615N/A follows:</p>
615N/A<pre>
615N/A iconv -f charsetsourceenc-value -t charsetdefault-value
615N/A
615N/A</pre>
615N/A
615N/A <h3>Mismatch between character set of content and translation
615N/A rules</h3>
615N/A
615N/A <p>If the translation rules don't make sense for the content,
615N/A translation can fail in various ways, including:</p>
615N/A
615N/A <ul>
615N/A <li>The translation mechanism may return a bad return code,
615N/A and the connection will be aborted.</li>
615N/A
617N/A <li>The translation mechanism may silently place special
617N/A characters (e.g., question marks) in the output buffer when
617N/A it cannot translate the input buffer.</li>
617N/A </ul>
617N/A <hr />
617N/A
617N/A <h2><a id="charsetsourceenc"
617N/A name="charsetsourceenc">CharsetSourceEnc</a></h2>
617N/A
617N/A <p><a href="directive-dict.html#Syntax"
617N/A rel="Help"><strong>Syntax:</strong></a> CharsetSourceEnc
617N/A <em>charset</em><br />
617N/A <a href="directive-dict.html#Default"
617N/A rel="Help"><strong>Default:</strong></a> <em>None</em><br />
617N/A <a href="directive-dict.html#Context"
617N/A rel="Help"><strong>Context:</strong></a> directory, virtual
617N/A host<br />
617N/A <a href="directive-dict.html#Override"
617N/A rel="Help"><strong>Override:</strong></a>
617N/A <em>FileInfo</em><br />
617N/A <a href="directive-dict.html#Status"
617N/A rel="Help"><strong>Status:</strong></a> Experimental<br />
617N/A <a href="directive-dict.html#Module"
617N/A rel="Help"><strong>Module:</strong></a> mod_charset_lite<br />
617N/A </p>
617N/A
617N/A <p>The <code>CharsetSourceEnc</code> directive specifies the
617N/A source charset of files in the associated container.</p>
617N/A
617N/A <p>The value of the <em>charset</em> argument must be accepted
617N/A as a valid character set name by the character set support in
617N/A APR. Generally, this means that it must be supported by
617N/A iconv.</p>
617N/A Example:
617N/A<pre>
617N/A &lt;Directory "/export/home/trawick/apacheinst/htdocs/convert"&gt;
617N/A CharsetSourceEnc UTF-16BE
617N/A CharsetDefault ISO8859-1
617N/A &lt;/Directory&gt;
617N/A
618N/A</pre>
617N/A The character set names in this example work with the iconv
617N/A translation support in Solaris 8.
617N/A <hr />
617N/A
618N/A <h2><a id="charsetdefault"
618N/A name="charsetdefault">CharsetDefault</a></h2>
618N/A
618N/A <p><a href="directive-dict.html#Syntax"
617N/A rel="Help"><strong>Syntax:</strong></a> CharsetDefault
618N/A <em>charset</em><br />
617N/A <a href="directive-dict.html#Default"
617N/A rel="Help"><strong>Default:</strong></a> <em>None</em><br />
617N/A <a href="directive-dict.html#Context"
617N/A rel="Help"><strong>Context:</strong></a> directory, virtual
618N/A host<br />
617N/A <a href="directive-dict.html#Override"
617N/A rel="Help"><strong>Override:</strong></a>
617N/A <em>FileInfo</em><br />
618N/A <a href="directive-dict.html#Status"
618N/A rel="Help"><strong>Status:</strong></a> Experimental<br />
618N/A <a href="directive-dict.html#Module"
618N/A rel="Help"><strong>Module:</strong></a> mod_charset_lite<br />
617N/A </p>
618N/A
617N/A <p>The <code>CharsetDefault</code> directive specifies the
617N/A charset that content in the associated container should be
617N/A translated to.</p>
617N/A
618N/A <p>The value of the <em>charset</em> argument must be accepted
617N/A as a valid character set name by the character set support in
617N/A APR. Generally, this means that it must be supported by
617N/A iconv.</p>
618N/A Example:
618N/A<pre>
618N/A &lt;Directory "/export/home/trawick/apacheinst/htdocs/convert"&gt;
618N/A CharsetSourceEnc UTF-16BE
617N/A CharsetDefault ISO8859-1
618N/A &lt;/Directory&gt;
617N/A
617N/A</pre>
617N/A <hr />
615N/A
<h2><a id="charsetoptions"
name="charsetoptions">CharsetOptions</a></h2>
<p><a href="directive-dict.html#Syntax"
rel="Help"><strong>Syntax:</strong></a> CharsetOptions
<em>option</em> [<em>option</em>] ...<br />
<a href="directive-dict.html#Default"
rel="Help"><strong>Default:</strong></a> <em>DebugLevel=0</em>
<em>NoImplicitAdd</em><br />
<a href="directive-dict.html#Context"
rel="Help"><strong>Context:</strong></a> directory, virtual
host<br />
<a href="directive-dict.html#Override"
rel="Help"><strong>Override:</strong></a>
<em>FileInfo</em><br />
<a href="directive-dict.html#Status"
rel="Help"><strong>Status:</strong></a> Experimental<br />
<a href="directive-dict.html#Module"
rel="Help"><strong>Module:</strong></a> mod_charset_lite<br />
</p>
<p>The <code>CharsetOptions</code> directive configures certain
behaviors of <code>mod_charset_lite</code>. <em>Option</em> can
be one of</p>
<dl>
<dt>DebugLevel=<em>n</em></dt>
<dd>The <samp>DebugLevel</samp> keyword allows you to specify
the level of debug messages generated by
<code>mod_charset_lite</code>. By default, no messages are
generated. This is equivalent to <samp>DebugLevel=0</samp>.
With higher numbers, more debug messages are generated, and
server performance will be degraded. The actual meanings of
the numeric values are described with the definitions of the
DBGLVL_ constants near the beginning of
<code>mod_charset_lite.c</code>.</dd>
<dt>ImplicitAdd | NoImplicitAdd</dt>
<dd>The <samp>ImplicitAdd</samp> keyword specifies that
<code>mod_charset_lite</code> should implicitly insert its
filter when the configuration specifies that the character
set of content should be translated. If the filter chain is
explicitly configured using the AddOutputFilter directive,
<samp>NoImplicitAdd</samp> should be specified so that
<code>mod_charset_lite</code> doesn't add its filter.</dd>
</dl>
<br />
<br />
<!--#include virtual="footer.html" -->
</body>
</html>