[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua and UTF-8 ?
- From: PA <petite.abeille@...>
- Date: Thu, 4 Oct 2007 15:42:20 +0200
On Oct 04, 2007, at 15:30, Aladdin Lampà wrote:
I am building a large application needing (Lua - of course) and also
UTF-8 support.
While we are at it, there is also something like Sean M. Burke's
Text::Unidecode:
http://interglacial.com/~sburke/tpj/as_html/tpj22.html
http://search.cpan.org/~sburke/Text-Unidecode-0.04/lib/Text/Unidecode.pm
Here is an example of an implementation of Unidecode in Lua [1]:
local Unidecode = require( 'Unidecode' )
print( Unidecode( 'ÐÐÑÐÐÐÌ' ) )
print( Unidecode( 'åä' ) )
print( Unidecode( 'áÎÎÎá' ) )
print( Unidecode( 'ìì' ) )
print( Unidecode( 'æä' ) )
print( Unidecode( 'äéå' ) )
print( Unidecode( 'ààààà' ) )
print( Unidecode( '×ÖÖ×Ö×Ö×Ö××-×Ö××Ö' ) )
print( Unidecode( 'ØÙÙÙ ØÙØÙÙØÙ ÙÙØÙÙØ' ) )
print( Unidecode( 'ØÙØØÙ' ) )
print( Unidecode( 'GÃometrie DiffÃrentielle' ) )
> Moskva
> beijing
> Athena
> seoul
> dongjing
> jingdushi
> nepaal
> te'labiyb-yapvo
> tal 'abiyb yaafaa
> thran
> Geometrie Differentielle
[1] http://dev.alt.textdrive.com/browser/HTTP/Unidecode.lua