Greek Locale gia Perl
Simos Xenitellis
simos74 at gmx.net
Thu Feb 7 19:00:02 EET 2002
Την Πεμ, 07-02-2002 στις 16:18, ο/η Laris Vrahimis έγραψε:
> Simo, geia sou.
>
> To script chrisimopoia to \W construct kai to /i gia word substitution, dhladh:
>
> $i=~s/(\W)$string(\W)/\1<b><FONT COLOR="08087B">$string<\/FONT><\/b>\2/ig;
>
> Mono pou to \W kai to /i den douleuoun swsta sta ellhnika keimena giati to
> Perl den anagnwrizei tous ellhnikous charakthres ws grammata oute kai
> mporei na anagnwrisei thn antistoixia metaju ellhnikwn kefalaiwn kai
> mikrwn. To script qa chrisimopoihqei se ena commercial server sto opoio exw
> account. Sto sxetiko site dhmosieuontai dwrean kypriakes apofaseis
> dikasthriwn (h proswrionh dieuthinsi einai www.cylaw.com).
Entajei, twra einai pio katanoito.
Basika afto pou 8eleis perigrafete sto "man perllocale".
Genika, gia tin energopoiisi tou "ellinikou locale" mesa apo ena
programma Perl kaneis ta ejeis:
==========
#!/usr/bin/env perl
# This functionality not usable prior to Perl 5.004
require 5.004;
use POSIX qw(locale_h);
use locale;
# query and save the old locale
setlocale(LC_ALL, "el_GR.ISO8859-7");
$_ = "ένα δύο τρία τέσσερα πέντε";
if (/(\w)\s+τρία\s+(\w)/) {print "$1 -- $2\n";}
===========
8a emfanisei "ο" kai "τ".
simos
> At 02:29 ìì 7/2/2002 +0000, you wrote:
> >Ôçí Ðåì, 07-02-2002 óôéò 13:39, ï/ç Laris Vrahimis Ýãñáøå:
> > > Etoimazw ena script me perl gia na xeirizetai ellhnika keimena sto
> > > Internet. Vasika to script xrhsimopoieitai me ena search engine kai kanei
> > > highlighted ta keywords sta keimena pou epistrefei h ereuna. Jereis mhpws
> > > kapoios pws mporw na egkatasthsw to Ellhniko Locale gia thn perl (kyriws
> > > pou mporw na brw ta sxetika arxeia kai an mporw na zhthsw apo ton
> > > administrator mou na ta egkatasthsei ston server tou).
> >
> >Den nomizw na katalaba akribws ti 8eleis na peis.
> >H ypostiriji locale stin Perl mporei na ginei mesw tou paketou "gettext"
> >(CPAN). Ostoso, to "gettext" xrisimopoieite otan 8eleis na ftiajeis ena
> >programma to opoio einai "i18n-ised", diladi analogws me tis ru8miseis
> >locale tou xristi poy to ektelei, na emfanizei ta minimata stin katalili
> >swsti glwssa. An se endiaferei mono i elliniki glwssa, tote einai perito
> >na mpeis sto kopo na baleis "gettext", ta grafeis ola sta ellinika.
> >
> >simos
> >
> >--
> >linux-greek-users mailing list -- http://lists.hellug.gr
>
>
>
>
> --
> linux-greek-users mailing list -- http://lists.hellug.gr
>
More information about the Linux-greek-users
mailing list