<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://wiki.nginx.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wiki.nginx.org/index.php?title=HttpIconvModule&amp;feed=atom&amp;action=history</id>
		<title>HttpIconvModule - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.nginx.org/index.php?title=HttpIconvModule&amp;feed=atom&amp;action=history"/>
		<link rel="alternate" type="text/html" href="http://wiki.nginx.org/index.php?title=HttpIconvModule&amp;action=history"/>
		<updated>2013-05-24T01:22:56Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.19.0</generator>

	<entry>
		<id>http://wiki.nginx.org/index.php?title=HttpIconvModule&amp;diff=527&amp;oldid=prev</id>
		<title>MichaelLustfield: moved NginxHttpIconvModule to HttpIconvModule:&amp;#32;Removing Nginx prefix from page titles</title>
		<link rel="alternate" type="text/html" href="http://wiki.nginx.org/index.php?title=HttpIconvModule&amp;diff=527&amp;oldid=prev"/>
				<updated>2010-09-22T19:26:22Z</updated>
		
		<summary type="html">&lt;p&gt;moved &lt;a href=&quot;/NginxHttpIconvModule&quot; class=&quot;mw-redirect&quot; title=&quot;NginxHttpIconvModule&quot;&gt;NginxHttpIconvModule&lt;/a&gt; to &lt;a href=&quot;/HttpIconvModule&quot; title=&quot;HttpIconvModule&quot;&gt;HttpIconvModule&lt;/a&gt;: Removing Nginx prefix from page titles&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Name =&lt;br /&gt;
&lt;br /&gt;
iconv-nginx-module&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
&lt;br /&gt;
This is a nginx module that uses libiconv to convert characters of different&lt;br /&gt;
encoding. It brings the 'set_iconv' command to nginx.&lt;br /&gt;
&lt;br /&gt;
This module depends on the ngx_devel_kit(NDK) module.&lt;br /&gt;
&lt;br /&gt;
= Installation =&lt;br /&gt;
&lt;br /&gt;
    Get the nginx source code from nginx.net (http://nginx.net/).&lt;br /&gt;
    Untar the source code and build nginx with this module.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;geshi lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
        $ wget 'http://sysoev.ru/nginx/nginx-0.8.28.tar.gz'&lt;br /&gt;
        $ tar -xzvf nginx-0.8.28.tar.gz&lt;br /&gt;
        $ cd nginx-0.8.28/&lt;br /&gt;
&lt;br /&gt;
        $ git-clone http://github.com/simpl-it/ngx_devel_kit.git&lt;br /&gt;
        $ git-clone http://github.com/calio/form-input-module.git&lt;br /&gt;
&lt;br /&gt;
        $ ./configure --add-module=/somepath/iconv-nginx-module/ --add-module=/somepath/ngx_devel_kit&lt;br /&gt;
        $ make -j2&lt;br /&gt;
        $ make install&lt;br /&gt;
&amp;lt;/geshi&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Usage =&lt;br /&gt;
&lt;br /&gt;
    set_iconv &amp;lt;destination variable&amp;gt; &amp;lt;from variable&amp;gt; from=&amp;lt;from encoding&amp;gt; to=&amp;lt;to encoding&amp;gt;;&lt;br /&gt;
    iconv_buffer_size &amp;lt;size&amp;gt;;   #default iconv_buffer_size is ngx_pagesize&lt;br /&gt;
    iconv_filter from=&amp;lt;from encoding&amp;gt; to=&amp;lt;to encoding&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
Here is a basic example:&lt;br /&gt;
&amp;lt;geshi lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
    #nginx.conf&lt;br /&gt;
        location /foo {&lt;br /&gt;
            set $src '你好'; #in UTF-8&lt;br /&gt;
            set_iconv $dst $src from=utf8 to=gbk; #now $dst holds 你好 in GBK&lt;br /&gt;
        }&lt;br /&gt;
        #everything generated from /foo will be converted from utf8 to gbk&lt;br /&gt;
        location /bar {&lt;br /&gt;
            iconv_filter from=utf-8 to=gbk;&lt;br /&gt;
            iconv_buffer_size 1k;&lt;br /&gt;
            #content handler here&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/geshi&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Copyright &amp;amp; License =&lt;br /&gt;
&lt;br /&gt;
This program is licenced under the BSD license.&lt;br /&gt;
&lt;br /&gt;
Copyright (c) 2010, Taobao Inc, Alibaba Group ( http://www.taobao.com/).&lt;br /&gt;
Copyright (c) 2010, Calio &amp;lt;vipcalio@gmail.com&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
All rights reserved.&lt;br /&gt;
&lt;br /&gt;
Redistribution and use in source and binary forms, with or without&lt;br /&gt;
modification, are permitted provided that the following conditions&lt;br /&gt;
are met:&lt;br /&gt;
&lt;br /&gt;
* Redistributions of source code must retain the above copyright&lt;br /&gt;
notice, this list of conditions and the following disclaimer.&lt;br /&gt;
* Redistributions in binary form must reproduce the above copyright&lt;br /&gt;
notice, this list of conditions and the following disclaimer in the&lt;br /&gt;
documentation and/or other materials provided with the distribution.&lt;br /&gt;
* Neither the name of the Taobao Inc. nor the names of its&lt;br /&gt;
contributors may be used to endorse or promote products derived from&lt;br /&gt;
this software without specific prior written permission.&lt;br /&gt;
&lt;br /&gt;
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS&lt;br /&gt;
&amp;quot;AS IS&amp;quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT&lt;br /&gt;
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR&lt;br /&gt;
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT&lt;br /&gt;
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,&lt;br /&gt;
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED&lt;br /&gt;
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR&lt;br /&gt;
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF&lt;br /&gt;
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING&lt;br /&gt;
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS&lt;br /&gt;
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.&lt;br /&gt;
&lt;br /&gt;
= Changelog =&lt;br /&gt;
v0.02   add iconv_filter and iconv_buffer_size instruction&lt;br /&gt;
&lt;br /&gt;
v0.01   implement  set_iconv instruction&lt;/div&gt;</summary>
		<author><name>MichaelLustfield</name></author>	</entry>

	</feed>