mirror of
				https://github.com/apache/httpd.git
				synced 2025-10-31 19:10:37 +03:00 
			
		
		
		
	git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91116 13f79535-47bb-0310-9956-ffa450edef68
		
			
				
	
	
		
			233 lines
		
	
	
		
			8.5 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			233 lines
		
	
	
		
			8.5 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 | |
|     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 | |
| 
 | |
| <html xmlns="http://www.w3.org/1999/xhtml">
 | |
|   <head>
 | |
|     <meta name="generator" content="HTML Tidy, see www.w3.org" />
 | |
| 
 | |
|     <title>Apache module mod_charset_lite</title>
 | |
|   </head>
 | |
|   <!-- Background white, links blue (unvisited), navy (visited), red (active) -->
 | |
| 
 | |
|   <body bgcolor="#FFFFFF" text="#000000" link="#0000FF"
 | |
|   vlink="#000080" alink="#FF0000">
 | |
|     <!--#include virtual="header.html" -->
 | |
| 
 | |
|     <h1 align="CENTER">Module mod_charset_lite</h1>
 | |
| 
 | |
|     <p>This module provides the ability to specify character set
 | |
|     translation or recoding.</p>
 | |
| 
 | |
|     <p><a href="module-dict.html#Status"
 | |
|     rel="Help"><strong>Status:</strong></a> Experimental<br />
 | |
|      <a href="module-dict.html#SourceFile"
 | |
|     rel="Help"><strong>Source File:</strong></a>
 | |
|     mod_charset_lite.c<br />
 | |
|      <a href="module-dict.html#ModuleIdentifier"
 | |
|     rel="Help"><strong>Module Identifier:</strong></a>
 | |
|     charset_lite_module</p>
 | |
| 
 | |
|     <h2>Summary</h2>
 | |
| 
 | |
|     <p>This is an <strong>experimental</strong> module and should
 | |
|     be used with care. Experiment with your
 | |
|     <code>mod_charset_lite</code> configuration to ensure that it
 | |
|     performs the desired function.</p>
 | |
| 
 | |
|     <p><code>mod_charset_lite</code> allows the administrator to
 | |
|     specify the source character set of objects as well as the
 | |
|     character set they should be translated into before sending to
 | |
|     the client. <code>mod_charset_lite</code> does not translate
 | |
|     the data itself but instead tells Apache what translation to
 | |
|     perform. <code>mod_charset_lite</code> is applicable to EBCDIC
 | |
|     and ASCII host environments. In an EBCDIC environment, Apache
 | |
|     normally translates text content from the code page of the
 | |
|     Apache process locale to ISO-8859-1.
 | |
|     <code>mod_charset_lite</code> can be used to specify that a
 | |
|     different translation is to be performed. In an ASCII
 | |
|     environment, Apache normally performs no translation, so
 | |
|     <code>mod_charset_lite</code> is needed in order for any
 | |
|     translation to take place.</p>
 | |
| 
 | |
|     <p>This module will only work if <code>APACHE_XLATE</code> is
 | |
|     defined at compile time.</p>
 | |
| 
 | |
|     <p>This module provides a small subset of configuration
 | |
|     mechanisms implemented by Russian Apache and its associated
 | |
|     <code>mod_charset</code>.</p>
 | |
| 
 | |
|     <h2>Directives</h2>
 | |
| 
 | |
|     <ul>
 | |
|       <li><a href="#charsetsourceenc">CharsetSourceEnc</a></li>
 | |
| 
 | |
|       <li><a href="#charsetdefault">CharsetDefault</a></li>
 | |
| 
 | |
|       <li><a href="#charsetoptions">CharsetOptions</a></li>
 | |
|     </ul>
 | |
| 
 | |
|     <h2>Common Problems</h2>
 | |
| 
 | |
|     <h3>Invalid character set names</h3>
 | |
| 
 | |
|     <p>The character set name parameters of CharsetSourceEnc and
 | |
|     CharsetDefault must be acceptable to the translation mechanism
 | |
|     used by APR on the system where mod_charset_lite is deployed.
 | |
|     These character set names are not standardized and are usually
 | |
|     not the same as the corresponding values used in http headers.
 | |
|     Currently, APR can only use iconv(3), so you can easily test
 | |
|     your character set names using the iconv(1) program, as
 | |
|     follows:</p>
 | |
| <pre>
 | |
|   iconv -f charsetsourceenc-value -t charsetdefault-value
 | |
|  
 | |
| </pre>
 | |
| 
 | |
|     <h3>Mismatch between character set of content and translation
 | |
|     rules</h3>
 | |
| 
 | |
|     <p>If the translation rules don't make sense for the content,
 | |
|     translation can fail in various ways, including:</p>
 | |
| 
 | |
|     <ul>
 | |
|       <li>The translation mechanism may return a bad return code,
 | |
|       and the connection will be aborted.</li>
 | |
| 
 | |
|       <li>The translation mechanism may silently place special
 | |
|       characters (e.g., question marks) in the output buffer when
 | |
|       it cannot translate the input buffer.</li>
 | |
|     </ul>
 | |
|     <hr />
 | |
| 
 | |
|     <h2><a id="charsetsourceenc"
 | |
|     name="charsetsourceenc">CharsetSourceEnc</a></h2>
 | |
| 
 | |
|     <p><a href="directive-dict.html#Syntax"
 | |
|     rel="Help"><strong>Syntax:</strong></a> CharsetSourceEnc
 | |
|     <em>charset</em><br />
 | |
|      <a href="directive-dict.html#Default"
 | |
|     rel="Help"><strong>Default:</strong></a> <em>None</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>CharsetSourceEnc</code> directive specifies the
 | |
|     source charset of files in the associated container.</p>
 | |
| 
 | |
|     <p>The value of the <em>charset</em> argument must be accepted
 | |
|     as a valid character set name by the character set support in
 | |
|     APR. Generally, this means that it must be supported by
 | |
|     iconv.</p>
 | |
|     Example: 
 | |
| <pre>
 | |
|     <Directory "/export/home/trawick/apacheinst/htdocs/convert">
 | |
|     CharsetSourceEnc  UTF-16BE
 | |
|     CharsetDefault    ISO8859-1
 | |
|     </Directory>
 | |
|  
 | |
| </pre>
 | |
|     The character set names in this example work with the iconv
 | |
|     translation support in Solaris 8. 
 | |
|     <hr />
 | |
| 
 | |
|     <h2><a id="charsetdefault"
 | |
|     name="charsetdefault">CharsetDefault</a></h2>
 | |
| 
 | |
|     <p><a href="directive-dict.html#Syntax"
 | |
|     rel="Help"><strong>Syntax:</strong></a> CharsetDefault
 | |
|     <em>charset</em><br />
 | |
|      <a href="directive-dict.html#Default"
 | |
|     rel="Help"><strong>Default:</strong></a> <em>None</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>CharsetDefault</code> directive specifies the
 | |
|     charset that content in the associated container should be
 | |
|     translated to.</p>
 | |
| 
 | |
|     <p>The value of the <em>charset</em> argument must be accepted
 | |
|     as a valid character set name by the character set support in
 | |
|     APR. Generally, this means that it must be supported by
 | |
|     iconv.</p>
 | |
|     Example: 
 | |
| <pre>
 | |
|     <Directory "/export/home/trawick/apacheinst/htdocs/convert">
 | |
|     CharsetSourceEnc  UTF-16BE
 | |
|     CharsetDefault    ISO8859-1
 | |
|     </Directory>
 | |
|  
 | |
| </pre>
 | |
|     <hr />
 | |
| 
 | |
|     <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>
 | |
| 
 |