github.com/krum110487/go-htaccess@v0.0.0-20240316004156-60641c8e7598/tests/data/apache_2_2_34/manual/mod/mod_charset_lite.html.en (about) 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 <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" /> 5 <!-- 6 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 7 This file is generated from xml source: DO NOT EDIT 8 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 9 --> 10 <title>mod_charset_lite - Apache HTTP Server Version 2.2</title> 11 <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" /> 12 <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" /> 13 <link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" /> 14 <script src="../style/scripts/prettify.min.js" type="text/javascript"> 15 </script> 16 17 <link href="../images/favicon.ico" rel="shortcut icon" /><link href="http://httpd.apache.org/docs/current/mod/mod_charset_lite.html" rel="canonical" /></head> 18 <body> 19 <div id="page-header"> 20 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p> 21 <p class="apache">Apache HTTP Server Version 2.2</p> 22 <img alt="" src="../images/feather.gif" /></div> 23 <div class="up"><a href="./"><img title="<-" alt="<-" src="../images/left.gif" /></a></div> 24 <div id="path"> 25 <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.2</a> > <a href="./">Modules</a></div> 26 <div id="page-content"> 27 <div class="retired"><h4>Please note</h4> 28 <p> This document refers to a legacy release (<strong>2.2</strong>) of Apache httpd. The active release (<strong>2.4</strong>) is documented <a href="http://httpd.apache.org/docs/current">here</a>. If you have not already upgraded, please follow <a href="http://httpd.apache.org/docs/current/upgrading.html">this link</a> for more information.</p> 29 <p>You may follow <a href="http://httpd.apache.org/docs/current/mod/mod_charset_lite.html">this link</a> to go to the current version of this document.</p></div><div id="preamble"><h1>Apache Module mod_charset_lite</h1> 30 <div class="toplang"> 31 <p><span>Available Languages: </span><a href="../en/mod/mod_charset_lite.html" title="English"> en </a> | 32 <a href="../ko/mod/mod_charset_lite.html" hreflang="ko" rel="alternate" title="Korean"> ko </a></p> 33 </div> 34 <table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Specify character set translation or recoding</td></tr> 35 <tr><th><a href="module-dict.html#Status">Status:</a></th><td>Extension</td></tr> 36 <tr><th><a href="module-dict.html#ModuleIdentifier">Module Identifier:</a></th><td>charset_lite_module</td></tr> 37 <tr><th><a href="module-dict.html#SourceFile">Source File:</a></th><td>mod_charset_lite.c</td></tr></table> 38 <h3>Summary</h3> 39 40 <p><code class="module"><a href="../mod/mod_charset_lite.html">mod_charset_lite</a></code> allows the server to change 41 the character set of responses before sending them to the client. 42 In an EBCDIC environment, Apache always translates HTTP protocol 43 content (e.g. response headers) from the code page of the Apache 44 process locale to ISO-8859-1, but not the body of responses. In 45 any environment, <code class="module"><a href="../mod/mod_charset_lite.html">mod_charset_lite</a></code> can be used to 46 specify that response bodies should be translated. For example, 47 if files are stored in EBCDIC, then 48 <code class="module"><a href="../mod/mod_charset_lite.html">mod_charset_lite</a></code> can translate them to 49 ISO-8859-1 before sending them to the client.</p> 50 51 <p>This module provides a small subset of configuration 52 mechanisms implemented by Russian Apache and its associated 53 <code>mod_charset</code>.</p> 54 </div> 55 <div id="quickview"><h3>Topics</h3> 56 <ul id="topics"> 57 <li><img alt="" src="../images/down.gif" /> <a href="#problems">Common Problems</a></li> 58 </ul><h3 class="directives">Directives</h3> 59 <ul id="toc"> 60 <li><img alt="" src="../images/down.gif" /> <a href="#charsetdefault">CharsetDefault</a></li> 61 <li><img alt="" src="../images/down.gif" /> <a href="#charsetoptions">CharsetOptions</a></li> 62 <li><img alt="" src="../images/down.gif" /> <a href="#charsetsourceenc">CharsetSourceEnc</a></li> 63 </ul> 64 <ul class="seealso"><li><a href="#comments_section">Comments</a></li></ul></div> 65 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> 66 <div class="section"> 67 <h2><a name="problems" id="problems">Common Problems</a></h2> 68 69 <h3>Invalid character set names</h3> 70 71 <p>The character set name parameters of <code class="directive"><a href="#charsetsourceenc">CharsetSourceEnc</a></code> and 72 <code class="directive"><a href="#charsetdefault">CharsetDefault</a></code> 73 must be acceptable to the translation mechanism used by 74 <a class="glossarylink" href="../glossary.html#apr" title="see glossary">APR</a> on the system where 75 <code class="module"><a href="../mod/mod_charset_lite.html">mod_charset_lite</a></code> is deployed. These character 76 set names are not standardized and are usually not the same as 77 the corresponding values used in http headers. Currently, APR 78 can only use iconv(3), so you can easily test your character set 79 names using the iconv(1) program, as follows:</p> 80 81 <div class="example"><p><code> 82 iconv -f charsetsourceenc-value -t charsetdefault-value 83 </code></p></div> 84 85 86 <h3>Mismatch between character set of content and translation 87 rules</h3> 88 89 <p>If the translation rules don't make sense for the content, 90 translation can fail in various ways, including:</p> 91 92 <ul> 93 <li>The translation mechanism may return a bad return code, 94 and the connection will be aborted.</li> 95 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> 99 </ul> 100 101 </div> 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>Extension</td></tr> 110 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_charset_lite</td></tr> 111 </table> 112 <p>The <code class="directive">CharsetDefault</code> directive specifies the 113 charset that content in the associated container should be 114 translated to.</p> 115 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 <a class="glossarylink" href="../glossary.html#apr" title="see glossary">APR</a>. Generally, this means that it must be 119 supported by iconv.</p> 120 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 /> 126 </span> 127 </Directory> 128 </code></p></div> 129 130 </div> 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>Extension</td></tr> 140 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_charset_lite</td></tr> 141 </table> 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 144 be one of</p> 145 146 <dl> 147 <dt><code>DebugLevel=<var>n</var></code></dt> 148 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> 158 159 <dt><code>ImplicitAdd | NoImplicitAdd</code></dt> 160 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> 168 169 <dt><code>TranslateAllMimeTypes | NoTranslateAllMimeTypes</code></dt> 170 <dd>Normally, <code class="module"><a href="../mod/mod_charset_lite.html">mod_charset_lite</a></code> will only perform 171 translation on a small subset of possible mimetypes. When the 172 <code>TranslateAllMimeTypes</code> keyword is specified for a given 173 configuration section, translation is performed without regard for 174 mimetype.</dd> 175 176 </dl> 177 178 </div> 179 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> 180 <div class="directive-section"><h2><a name="CharsetSourceEnc" id="CharsetSourceEnc">CharsetSourceEnc</a> <a name="charsetsourceenc" id="charsetsourceenc">Directive</a></h2> 181 <table class="directive"> 182 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Source charset of files</td></tr> 183 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CharsetSourceEnc <var>charset</var></code></td></tr> 184 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> 185 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr> 186 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr> 187 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_charset_lite</td></tr> 188 </table> 189 <p>The <code class="directive">CharsetSourceEnc</code> directive specifies the 190 source charset of files in the associated container.</p> 191 192 <p>The value of the <var>charset</var> argument must be accepted 193 as a valid character set name by the character set support in 194 <a class="glossarylink" href="../glossary.html#apr" title="see glossary">APR</a>. Generally, this means that it must be 195 supported by iconv.</p> 196 197 <div class="example"><h3>Example</h3><p><code> 198 <Directory /export/home/trawick/apacheinst/htdocs/convert><br /> 199 <span class="indent"> 200 CharsetSourceEnc UTF-16BE<br /> 201 CharsetDefault ISO-8859-1<br /> 202 </span> 203 </Directory> 204 </code></p></div> 205 206 <p>The character set names in this example work with the iconv 207 translation support in Solaris 8.</p> 208 209 </div> 210 </div> 211 <div class="bottomlang"> 212 <p><span>Available Languages: </span><a href="../en/mod/mod_charset_lite.html" title="English"> en </a> | 213 <a href="../ko/mod/mod_charset_lite.html" hreflang="ko" rel="alternate" title="Korean"> ko </a></p> 214 </div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div> 215 <script type="text/javascript"><!--//--><![CDATA[//><!-- 216 var comments_shortname = 'httpd'; 217 var comments_identifier = 'http://httpd.apache.org/docs/2.2/mod/mod_charset_lite.html'; 218 (function(w, d) { 219 if (w.location.hostname.toLowerCase() == "httpd.apache.org") { 220 d.write('<div id="comments_thread"><\/div>'); 221 var s = d.createElement('script'); 222 s.type = 'text/javascript'; 223 s.async = true; 224 s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier; 225 (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s); 226 } 227 else { 228 d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>'); 229 } 230 })(window, document); 231 //--><!]]></script></div><div id="footer"> 232 <p class="apache">Copyright 2017 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> 233 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!-- 234 if (typeof(prettyPrint) !== 'undefined') { 235 prettyPrint(); 236 } 237 //--><!]]></script> 238 </body></html>