|
lug-bg: Perl transliteration function (ISO-8859-1 -> CP-1251)
- Subject: lug-bg: Perl transliteration function (ISO-8859-1 -> CP-1251)
- From: tzz@xxxxxxxxxxxx (Ted Zlatanov)
- Date: Thu, 31 Oct 2002 22:17:21 -0500
¸ÓàÐå áØ á Perl ×Ð ÔÐ ßàÕÒÕÖÔÐÜ ID3 âÐÓÞÒÕ Þâ ÛÐâØÝØæÐ ÝÐ ÚØàØÛØæÐ
(1251). µâÞ äãÝÚæØïâÐ, ÚÞïâÞ ÕÒÕÝâãÐÛÝÞ ÝÐßØáÐå. ½Õ ×ÝÐÜ ÔÐÛØ âÞÒÐ
ÒÕçÕ ÓÞ ØÜÐ ÝïÚêÔÕ, ÝÞ Ð× ÝÕ ÜÞÖÐå ÔÐ ÓÞ ÝÐÜÕàï ×Ð Perl Ø ×Ð ÑêÛÓÐàáÚØ
(ÚÐÚÒÞâÞ ÝÐÜÕàØå ÑÕèÕ ×Ð àãáÚØ ÝÐÙ-ÒÕçÕ). ½ÐÔïÒÐÜ áÕ ÔÐ Õ ßÞÛÕ×ÝÐ ßÞ
ßàØÝæØß, Ð ÐÚÞ ØÜÐ ßÞ-ÔÞÑàÐ ÒÕàáØï ÝïÚêÔÕ ØÛØ ÓàÕèÚØ ÚÐÖÕâÕ.
ÂÕÞÔÞà
--
# CP-1251 specific transliteration
sub en2cyr_translate
{
my $s = shift @_;
# x transform
$s =~ s/x/ks/g;
# sht transform
$s =~ s/sht/ù/g;
$s =~ s/Sht/Ù/gi;
# sh transform
$s =~ s/sh/ø/g;
$s =~ s/Sh/Ø/gi;
# ch transform
$s =~ s/ch/÷/g;
$s =~ s/Ch/×/gi;
# ja/ia transforms
$s =~ s/ja/ÿ/g;
$s =~ s/Ja/ß/gi;
$s =~ s/ia/ÿ/g;
$s =~ s/Ia/ß/gi;
$s =~ s/ya/ÿ/g;
$s =~ s/Ya/ß/gi;
# ju/iu transforms
$s =~ s/ju/þ/g;
$s =~ s/Ju/Þ/gi;
$s =~ s/iu/þ/g;
$s =~ s/Iu/Þ/gi;
$s =~ s/yu/þ/g;
$s =~ s/Yu/Þ/gi;
# zh transforms
$s =~ s/zh/æ/g;
$s =~ s/Zh/Æ/gi;
# ts transforms
$s =~ s/ts/ö/g;
$s =~ s/Ts/Ö/gi;
$s =~ tr/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz/ÀÁÖÄÅÔÃÕÈÉÊËÌÍÎÏßÐÑÒÓÂÂÕÈÇàáöäåôãõèéêëìíîïÿðñòóââõèç/;
return $s;
}
============================================================================
A mail-list of Linux Users Group - Bulgaria (bulgarian linuxers).
http://www.linux-bulgaria.org - Hosted by Internet Group Ltd. - Stara Zagora
To unsubscribe: http://www.linux-bulgaria.org/public/mail_list.html
============================================================================
|
|
|