Re[4]: [NTG-context] Arabic-utf-8 (plus a sample)

Idris Samawi Hamid ntg-context@ntg.nl
Sun Jun 6 01:19:22 CEST 2004


On Sun, 6 Jun 2004 01:58:44 +0200, Giuseppe Bilotta <gip.bilotta@iol.it> 
wrote:

> ==
> #!/usr/bin/perl
>
> use strict;
> use warnings;
>
> open(NEW,">new.tex"); #opens file to print out the result
>
> while (<>) { #this opens the file for reading
>
> $_ =~ s/\xD8\xA7/A/g; #this is the actual conversion
> $_ =~ s/\xD8\xA8/b/g; #this is the actual conversion
> $_ =~ s/\xD8\xAC/j/g; #this is the actual conversion
> $_ =~ s/\xD8\xAF/d/g; #this is the actual conversion
> $_ =~ s/\xD9\x87/h/g; #this is the actual conversion
> $_ =~ s/\xD9\x88/w/g; #this is the actual conversion
> $_ =~ s/\xD8\xB2/z/g; #this is the actual conversion
>
> print NEW "$_"; #and this writes the result into file "new.tex"
> }
>
> close(NEW);
> ===

It works! I'll try to finish a basic script that works for Lagally's 
ArabTeX transcription (that I use) and post it here and on the aleph list.

One question: The hex for e.g. alif is 0627; how did you get D8A7 from 
that for purposes of the script (so I can follow along for the rest)?

Best
Idris

-- 
Professor Idris Samawi Hamid
Department of Philosophy
Colorado State University
Fort Collins, CO 80523



More information about the ntg-context mailing list