mirror of
https://github.com/lunarmodules/lua-iconv.git
synced 2025-06-23 04:34:33 +02:00
Regenarate index page
This commit is contained in:
parent
8a60d39ece
commit
54e2bf3276
101
index.html
101
index.html
@ -46,21 +46,25 @@ use the first release (lua-iconv-r1).
|
|||||||
<h2 id="download-and-installation">Download and installation</h2>
|
<h2 id="download-and-installation">Download and installation</h2>
|
||||||
|
|
||||||
<p>Lua-iconv can be obtained from its LuaForge project page
|
<p>Lua-iconv can be obtained from its LuaForge project page
|
||||||
(<a href="http://luaforge.net/projects/lua-iconv/">http://luaforge.net/projects/lua-iconv/</a>) or from some Linux distributions
|
(<a href="http://luaforge.net/projects/lua-iconv/">http://luaforge.net/projects/lua-iconv/</a>), from a LuaRocks server or from
|
||||||
which already provide it (eg. Debian).
|
some Linux distributions which already provide it (eg. Debian).
|
||||||
</p>
|
</p>
|
||||||
<p>Unless you downloaded a compiled package, you must build the library for
|
<p>Unless you downloaded a compiled package, you must build the library for
|
||||||
your system. If you are using a system with pkg-config (as many Linux
|
your system. If you have LuaRocks installed, all the process is automatic;
|
||||||
distributions and Unix flavors) just fire up your favourite shell, untar
|
just fire up your favourite shell and type, as root:
|
||||||
the distribution package and type, as root, within the program directory:
|
</p>
|
||||||
|
<pre> luarocks install lua-iconv
|
||||||
|
|
||||||
|
</pre><p>and the package will be downloaded from a rock server, installed and
|
||||||
|
configured. Otherwise, you must compile and install the package. In a system
|
||||||
|
with pkg-config (as many Linux distributions and Unix flavors) open a shell,
|
||||||
|
untar the distribution package and, within the program directory, type:
|
||||||
</p>
|
</p>
|
||||||
<pre> make install
|
<pre> make install
|
||||||
</pre>
|
|
||||||
<p>The library will be compiled and installed on the in the correct path (which
|
</pre><p>as root. The library will be compiled and installed on the in the correct
|
||||||
is defined in lua5.1.pc).
|
path (which is defined in lua5.1.pc). Compiling on systems without pkg-config
|
||||||
</p>
|
requires manual changes in the Makefile (this includes Windows).
|
||||||
<p>Compiling on systems without pkg-config requires manual changes in the
|
|
||||||
Makefile.
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
@ -70,79 +74,80 @@ Makefile.
|
|||||||
before use. From Lua 5.1 and later, you can simply do a
|
before use. From Lua 5.1 and later, you can simply do a
|
||||||
</p>
|
</p>
|
||||||
<pre> require "iconv"
|
<pre> require "iconv"
|
||||||
</pre>
|
|
||||||
<p>call to load up the library (that, of course, must be installed in a
|
</pre><p>call to load up the library (that, of course, must be installed in a
|
||||||
directory from package.cpath).
|
directory from package.cpath).
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<h2 id="api-documentation">API documentation</h2>
|
<h2 id="api-documentation">API documentation</h2>
|
||||||
|
|
||||||
<h4 id="iconvnewto-from">iconv.new(to, from)</h4>
|
<pre> cd = iconv.new(to, from)
|
||||||
<h4 id="iconvopento-from">iconv.open(to, from)</h4>
|
cd = iconv.open(to, from)
|
||||||
|
|
||||||
<pre> Opens a new conversion descriptor, from the 'from' charset to the
|
Opens a new conversion descriptor, from the 'from' charset to the
|
||||||
'to' charset. Concatenating "//TRANSLIT" to the first argument will
|
'to' charset. Concatenating "//TRANSLIT" to the first argument will
|
||||||
enable character transliteration and concatenating "//IGNORE" to
|
enable character transliteration and concatenating "//IGNORE" to
|
||||||
the first argument will cause iconv to ignore any invalid characters
|
the first argument will cause iconv to ignore any invalid characters
|
||||||
found in the input string.
|
found in the input string.
|
||||||
</pre>
|
|
||||||
<pre> This function returns a new converter or nil on error.
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<h4 id="cdiconvstr">cd:iconv(str)</h4>
|
This function returns a new converter or nil on error.
|
||||||
|
|
||||||
<pre> Converts the 'str' string to the desired charset. This method always
|
|
||||||
|
nstr, err = cd:iconv(str)
|
||||||
|
|
||||||
|
Converts the 'str' string to the desired charset. This method always
|
||||||
returns two arguments: the converted string and an error code, which
|
returns two arguments: the converted string and an error code, which
|
||||||
may have any of the following values:
|
may have any of the following values:
|
||||||
</pre>
|
|
||||||
<pre> nil
|
|
||||||
No error. Conversion was successful.
|
|
||||||
</pre>
|
|
||||||
<pre> iconv.ERROR_NO_MEMORY
|
|
||||||
Failed to allocate enough memory in the conversion process.
|
|
||||||
</pre>
|
|
||||||
<pre> iconv.ERROR_INVALID
|
|
||||||
An invalid character was found in the input sequence.
|
|
||||||
</pre>
|
|
||||||
<pre> iconv.ERROR_INCOMPLETE
|
|
||||||
An incomplete character was found in the input sequence.
|
|
||||||
</pre>
|
|
||||||
<pre> iconv.ERROR_UNKNOWN
|
|
||||||
There was an unknown error.
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<h2 id="license">License</h2>
|
nil
|
||||||
|
No error. Conversion was successful.
|
||||||
|
|
||||||
|
iconv.ERROR_NO_MEMORY
|
||||||
|
Failed to allocate enough memory in the conversion process.
|
||||||
|
|
||||||
|
iconv.ERROR_INVALID
|
||||||
|
An invalid character was found in the input sequence.
|
||||||
|
|
||||||
|
iconv.ERROR_INCOMPLETE
|
||||||
|
An incomplete character was found in the input sequence.
|
||||||
|
|
||||||
|
iconv.ERROR_UNKNOWN
|
||||||
|
There was an unknown error.
|
||||||
|
|
||||||
|
|
||||||
|
</pre><h2 id="license">License</h2>
|
||||||
|
|
||||||
<p>Lua-iconv is copyrighted free software: it can be used for both academic
|
<p>Lua-iconv is copyrighted free software: it can be used for both academic
|
||||||
and commercial purposes at absolutely no cost. There are no royalties
|
and commercial purposes at absolutely no cost. There are no royalties
|
||||||
or GNU-like "copyleft" restrictions. The legal details are below:
|
or GNU-like "copyleft" restrictions. The legal details are below:
|
||||||
</p>
|
</p>
|
||||||
<pre> Lua-iconv is (c) 2005-10 Alexandre Erwin Ittner
|
<pre> Lua-iconv is (c) 2005-10 Alexandre Erwin Ittner
|
||||||
</pre>
|
|
||||||
<pre> Permission is hereby granted, free of charge, to any person obtaining
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
a copy of this software and associated documentation files (the
|
a copy of this software and associated documentation files (the
|
||||||
"Software"), to deal in the Software without restriction, including
|
"Software"), to deal in the Software without restriction, including
|
||||||
without limitation the rights to use, copy, modify, merge, publish,
|
without limitation the rights to use, copy, modify, merge, publish,
|
||||||
distribute, sublicense, and/or sell copies of the Software, and to
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
permit persons to whom the Software is furnished to do so, subject
|
permit persons to whom the Software is furnished to do so, subject
|
||||||
to the following conditions:
|
to the following conditions:
|
||||||
</pre>
|
|
||||||
<pre> The above copyright notice and this permission notice shall be
|
The above copyright notice and this permission notice shall be
|
||||||
included in all copies or substantial portions of the Software.
|
included in all copies or substantial portions of the Software.
|
||||||
</pre>
|
|
||||||
<pre> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
IN NO EVENT SHALL THE AUTHOR OR COPYRIGHT HOLDER BE LIABLE FOR ANY
|
IN NO EVENT SHALL THE AUTHOR OR COPYRIGHT HOLDER BE LIABLE FOR ANY
|
||||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
</pre>
|
|
||||||
<pre> If you use this package in a product, an acknowledgment in the product
|
|
||||||
documentation would be greatly appreciated (but it is not required).
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
|
If you use this package in a product, an acknowledgment in the product
|
||||||
|
documentation would be greatly appreciated (but it is not required).
|
||||||
|
|
||||||
|
|
||||||
|
</pre>
|
||||||
<!-- End of HTML generated from README -->
|
<!-- End of HTML generated from README -->
|
||||||
|
|
||||||
<h2 id="contact">Contact</h2>
|
<h2 id="contact">Contact</h2>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user