Linux-Bulgaria.ORG
навигация

 

начало

пощенски списък

архив на групата

семинари ...

документи

как да ...

 

 

Предишно писмо Следващо писмо Предишно по тема Следващо по тема По Дата По тема (thread)

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
============================================================================



 

наши приятели

 

линукс за българи
http://linux-bg.org

FSA-BG
http://fsa-bg.org

OpenFest
http://openfest.org

FreeBSD BG
http://bg-freebsd.org

KDE-BG
http://kde.fsa-bg.org/

Gnome-BG
http://gnome.cult.bg/

проект OpenFMI
http://openfmi.net

NetField Forum
http://netField.ludost.net/forum/

 

 

Linux-Bulgaria.ORG

Mailing list messages are © Copyright their authors.