Ellhnika se X kai consola ...
Vasilios L. Pilarinos
vpilarin at unix.gsusa.org
Wed May 14 15:17:37 EEST 1997
On Tue, 13 May 1997, Jiannis Mitsos wrote:
%Prospa8w na ftia3w ena cgi scriptaki to opoio 8a pairnei apo mia
%forma mia ellhnikh le3h kai 8a kaneis kati antistoixiseis .
%To programa poy kanei tis antistoixiseis paizei sthn consola me
%ellhnika . Ayto poy 8a h8ela na rwthsw einai to e3hs :
%O xrhsths o opoios xrhsimopoihsei ena netscape apo makria kai 8a
%balei thn ellhnikh le3h se ena pedio otan mou thn sthlh sto linux
%mou bgazei kati treloys xarakthres ... to problhma apo oti
%katalabainw einai ka8ara 8ema enconding ... mhmpws kaneis
%gnwrizei kanena tropo etsi wste na ginetai kapoia antistoixish
%apo ta ellhnika toy "netscape" se kapoia allh morfh poy na
%mporw na ta dw apo thn consola !!!!!
den 3erw apo cgi, ala oriste ena perl script to opio metatrepei ar8ro
grammeno me ellhnikes grammatoseires se latinikes pou mporei na diabazetai
kai apo thn consola. 3.5k attachment.
euxomai na se boh8hsei..
%Giannis Mitsos
%gmitsos at duth.gr
Basilhs Pularinos
vpilarin at gsusa.org
-------------- next part --------------
#! /usr/local/bin/perl
# ####################################################
# Gia na douleyei auto to programma, swseto me
# opoiodhpote onoma, p.x. allagh.pl kai meta
# metatreyeto se executable me to chmod +x allagh.pl
# Gia na to tre3eis arkei mono na grayeis
# allagh.pl sto unix prompt kai egine!
#
# To programma 0a sou zhthsei na dwseis to onoma
# tou arxeiou pou einai na metatrapei, kai afou
# dwseis <return>, 0a sou gurisei ena arxeio me to
# onoma arxeio.gl (p.x. an to maria arxeio exei ta
# greek fonts, to maria.gl exei ta greeklish(!) fonts
#
# Opoiadhpote la0h kai paraleiyeis/parapona sthn
# Dafnh Manousakh (pou egraye to programma)
# daphne at amath.washington.edu
# Hmeromhnia: 13 Oktwbriou 1995
#######################################################
print("Input the name of the file to be converted from greek fonts into greeklish\n ----> ");
$filename = <STDIN>;
chop($filename);
if (stat($filename) == 1) {
open(input, $filename);
@in = <input>;
#############################################
# To $len ka0orizei ton ari0mo twn grammwn sto arxeio filename
# etsi wste sto epomeno loop na 3erw se poses grammes na paei
# na ginei h allagh. Mporeis na alla3eis to $len wste
# h allagh na stamathsei kapou nwritera, p.x. $len = $len -3;
# 0a stamathsei na allazei 2 grammes prin to telos
##############################################
$len = @in;
#############################################
# Kai to loop ths allaghs
#############################################
$idot = "ì";
$em = "m";
$sigma = "ó";
$steliko = "ò";
$es = "s";
$psi = "ø";
$gpsi = "y";
$idial = "ú";
$dial = ".i.";
foreach $i (0..$len) {
$in[$i] =~ s/Á/A/ge;
$in[$i] =~ s/¢/A/g;
$in[$i] =~ s/Â/B/ge;
$in[$i] =~ s/Ã/G/ge;
$in[$i] =~ s/Ä/D/ge;
$in[$i] =~ s/¸/E/ge;
$in[$i] =~ s/Å/E/ge;
$in[$i] =~ s/Æ/Z/ge;
$in[$i] =~ s/Ç/H/ge;
$in[$i] =~ s/È/Q/ge;
$in[$i] =~ s/É/I/ge;
$in[$i] =~ s/º/I/ge;
$in[$i] =~ s/Ê/K/ge;
$in[$i] =~ s/Ë/L/ge;
$in[$i] =~ s/Ì/M/ge;
$in[$i] =~ s/Í/N/ge;
$in[$i] =~ s/Î/3/ge;
$in[$i] =~ s/Ï/O/ge;
$in[$i] =~ s/¼/O/ge;
$in[$i] =~ s/Ð/P/ge;
$in[$i] =~ s/Ñ/R/ge;
$in[$i] =~ s/Ó/S/ge;
$in[$i] =~ s/Ô/T/ge;
$in[$i] =~ s/Õ/Y/ge;
$in[$i] =~ s/Ö/F/ge;
$in[$i] =~ s/×/X/ge;
$in[$i] =~ s/Ø/Y/ge;
$in[$i] =~ s/Ù/W/ge;
$in[$i] =~ s/á/a/ge;
$in[$i] =~ s/Ü/a/ge;
$in[$i] =~ s/â/b/ge;
$in[$i] =~ s/ã/g/ge;
$in[$i] =~ s/ä/d/ge;
$in[$i] =~ s/Ý/e/ge;
$in[$i] =~ s/å/e/ge;
$in[$i] =~ s/æ/z/ge;
$in[$i] =~ s/ç/h/ge;
$in[$i] =~ s/Þ/h/ge;
$in[$i] =~ s/è/0/ge;
$in[$i] =~ s/é/i/ge;
$in[$i] =~ s/ß/i/ge;
$in[$i] =~ s/$idial/$dial/ge;
$in[$i] =~ s/ê/k/ge;
$in[$i] =~ s/ë/l/ge;
$in[$i] =~ s/$idot/$em/ge;
$in[$i] =~ s/í/v/ge;
$in[$i] =~ s/î/3/ge;
$in[$i] =~ s/ü/o/ge;
$in[$i] =~ s/ï/o/ge;
$in[$i] =~ s/ð/p/ge;
$in[$i] =~ s/ñ/r/ge;
$in[$i] =~ s/$sigma/$es/ge;
$in[$i] =~ s/$steliko/$es/ge;
$in[$i] =~ s/ô/t/ge;
$in[$i] =~ s/õ/u/ge;
$in[$i] =~ s/ý/u/ge;
$in[$i] =~ s/ö/f/ge;
$in[$i] =~ s/÷/x/ge;
$in[$i] =~ s/$psi/$gpsi/ge;
$in[$i] =~ s/ù/w/ge;
$in[$i] =~ s/þ/w/ge;
$lefteis ="«";
$righteis = "»";
$latineis = "\"";
$in[$i] =~s/©/(c)/ge;
$in[$i] =~s/$lefteis/$latineis/ge;
$in[$i] =~s/$righteis/$latineis/ge;
}
##############################################
# To allagmeno arxeio 0a mpei se arxeio me to onoma
# filename.gl Shmeiwsh, to > xreiazetai ekei
# pou einai
##############################################
$newfile = ">" . $filename . "\.gl";
open(out,$newfile);
print out (@in);
print("Converted file is $filename\.gl \n");
}
else {
print("File $filename doesn't exist! \n");
}
More information about the Linux-greek-users
mailing list