615N/A<!
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 615N/A <
title>Apache module mod_charset_lite</
title>
615N/A <!-- Background white, links blue (unvisited), navy (visited), red (active) --> 615N/A <
body bgcolor="#FFFFFF" text="#000000" link="#0000FF" 615N/A vlink="#000080" alink="#FF0000">
615N/A <
h1 align="CENTER">Module mod_charset_lite</
h1>
615N/A <
p>This module provides the ability to specify character set
615N/A translation or recoding.</
p>
615N/A rel="Help"><
strong>Status:</
strong></
a> Experimental<
br />
615N/A rel="Help"><
strong>Source File:</
strong></
a>
615N/A rel="Help"><
strong>Module Identifier:</
strong></
a>
617N/A charset_lite_module</
p>
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 <
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 <
p>This module will only work if <
code>APACHE_XLATE</
code> is
615N/A defined at compile time.</
p>
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 <
li><
a href="#charsetsourceenc">CharsetSourceEnc</
a></
li>
615N/A <
li><
a href="#charsetdefault">CharsetDefault</
a></
li>
615N/A <
li><
a href="#charsetoptions">CharsetOptions</
a></
li>
615N/A <
h2>Common Problems</
h2>
615N/A <
h3>Invalid character set names</
h3>
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 iconv -f charsetsourceenc-value -t charsetdefault-value
615N/A <
h3>Mismatch between character set of content and translation
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 <
li>The translation mechanism may return a bad return code,
615N/A and the connection will be aborted.</
li>
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 <
h2><
a id="charsetsourceenc" 617N/A name="charsetsourceenc">CharsetSourceEnc</
a></
h2>
617N/A rel="Help"><
strong>Syntax:</
strong></
a> CharsetSourceEnc
617N/A rel="Help"><
strong>Default:</
strong></
a> <
em>None</
em><
br />
617N/A rel="Help"><
strong>Context:</
strong></
a> directory, virtual
617N/A rel="Help"><
strong>Override:</
strong></
a>
617N/A <
em>FileInfo</
em><
br />
617N/A rel="Help"><
strong>Status:</
strong></
a> Experimental<
br />
617N/A rel="Help"><
strong>Module:</
strong></
a> mod_charset_lite<
br />
617N/A <
p>The <
code>CharsetSourceEnc</
code> directive specifies the
617N/A source charset of files in the associated container.</
p>
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 CharsetSourceEnc UTF-16BE
617N/A CharsetDefault ISO8859-1
617N/A The character set names in this example work with the iconv
617N/A translation support in Solaris 8.
618N/A <
h2><
a id="charsetdefault" 618N/A name="charsetdefault">CharsetDefault</
a></
h2>
617N/A rel="Help"><
strong>Syntax:</
strong></
a> CharsetDefault
617N/A rel="Help"><
strong>Default:</
strong></
a> <
em>None</
em><
br />
617N/A rel="Help"><
strong>Context:</
strong></
a> directory, virtual
617N/A rel="Help"><
strong>Override:</
strong></
a>
617N/A <
em>FileInfo</
em><
br />
618N/A rel="Help"><
strong>Status:</
strong></
a> Experimental<
br />
618N/A rel="Help"><
strong>Module:</
strong></
a> mod_charset_lite<
br />
617N/A <
p>The <
code>CharsetDefault</
code> directive specifies the
617N/A charset that content in the associated container should be
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
618N/A CharsetSourceEnc UTF-16BE
617N/A CharsetDefault ISO8859-1
<
h2><
a id="charsetoptions" name="charsetoptions">CharsetOptions</
a></
h2>
rel="Help"><
strong>Syntax:</
strong></
a> CharsetOptions
<
em>option</
em> [<
em>option</
em>] ...<
br />
rel="Help"><
strong>Default:</
strong></
a> <
em>DebugLevel=0</
em>
<
em>NoImplicitAdd</
em><
br />
rel="Help"><
strong>Context:</
strong></
a> directory, virtual
rel="Help"><
strong>Override:</
strong></
a>
rel="Help"><
strong>Status:</
strong></
a> Experimental<
br />
rel="Help"><
strong>Module:</
strong></
a> mod_charset_lite<
br />
<
p>The <
code>CharsetOptions</
code> directive configures certain
behaviors of <
code>mod_charset_lite</
code>. <
em>Option</
em> can
<
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
<
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>