lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]



http://dev.alt.textdrive.com/browser/HTTP/Unidecode.lua
http://dev.alt.textdrive.com/browser/HTTP/Unidecode


A frivolous port of 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


Usage example:

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
> Bei Jing
> Athena
> seoul
> Dong Jing
> Jing Du Shi
> nepaal
> te'labiyb-yapvo
> tal 'abiyb yafa
> thrn
> Geometrie Differentielle