From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/15332 Path: main.gmane.org!not-for-mail From: Idris Samawi Hamid Newsgroups: gmane.comp.tex.context Subject: Re: Re[4]: Arabic-utf-8 (plus a sample) Date: Sat, 05 Jun 2004 18:19:22 -0600 Organization: Colorado State University Sender: ntg-context-admin@ntg.nl Message-ID: References: <1086468099.5707.26.camel@tascomputer.home> <1086472098.5707.36.camel@tascomputer.home> <1579878055.20040606011556@iol.it> <424260277.20040606015844@iol.it> Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=iso-8859-15 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1086481444 8999 80.91.224.253 (6 Jun 2004 00:24:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 6 Jun 2004 00:24:04 +0000 (UTC) Original-X-From: ntg-context-admin@ntg.nl Sun Jun 06 02:23:58 2004 Return-path: Original-Received: from ref.vet.uu.nl ([131.211.172.13] helo=ref.ntg.nl) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BWlSA-0002RJ-00 for ; Sun, 06 Jun 2004 02:23:58 +0200 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id 9A34F10B85; Sun, 6 Jun 2004 02:23:55 +0200 (MEST) Original-Received: from eagle.acns.ColoState.EDU (eagle.acns.colostate.edu [129.82.100.90]) by ref.ntg.nl (Postfix) with ESMTP id 2C38A10B21 for ; Sun, 6 Jun 2004 02:19:24 +0200 (MEST) Original-Received: from lamar.colostate.edu (lamar.acns.colostate.edu [129.82.100.75]) by eagle.acns.ColoState.EDU (AIX5.1/8.11.6p2/8.11.0) with ESMTP id i560JNL877624 for ; Sat, 5 Jun 2004 18:19:23 -0600 Original-Received: from IHAMID (ihamid.libarts.colostate.edu [129.82.187.166]) by lamar.colostate.edu (AIX5.1/8.11.6p2/8.11.0) with ESMTP id i560JNe608674 for ; Sat, 5 Jun 2004 18:19:23 -0600 Original-To: ntg-context@ntg.nl In-Reply-To: <424260277.20040606015844@iol.it> User-Agent: Opera7.23/Win32 M2 build 3227 Errors-To: ntg-context-admin@ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.0.13 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.comp.tex.context:15332 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:15332 On Sun, 6 Jun 2004 01:58:44 +0200, Giuseppe Bilotta 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