From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/15330 Path: main.gmane.org!not-for-mail From: Giuseppe Bilotta Newsgroups: gmane.comp.tex.context Subject: Re[4]: Arabic-utf-8 (plus a sample) Date: Sun, 6 Jun 2004 01:58:44 +0200 Sender: ntg-context-admin@ntg.nl Message-ID: <424260277.20040606015844@iol.it> References: <1086468099.5707.26.camel@tascomputer.home> <1086472098.5707.36.camel@tascomputer.home> <1579878055.20040606011556@iol.it> Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1086480241 7283 80.91.224.253 (6 Jun 2004 00:04:01 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 6 Jun 2004 00:04:01 +0000 (UTC) Original-X-From: ntg-context-admin@ntg.nl Sun Jun 06 02:03:54 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 1BWl8k-0001zU-00 for ; Sun, 06 Jun 2004 02:03:54 +0200 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id 8AB2E10B46; Sun, 6 Jun 2004 02:03:50 +0200 (MEST) Original-Received: from smtp0.libero.it (smtp0.libero.it [193.70.192.33]) by ref.ntg.nl (Postfix) with ESMTP id AEA9B10B21 for ; Sun, 6 Jun 2004 02:01:49 +0200 (MEST) Original-Received: from ppp-133-141.29-151.libero.it (151.29.141.133) by smtp0.libero.it (7.0.027-DD01) id 40B4BDD40025E3FF for ntg-context@ntg.nl; Sun, 6 Jun 2004 02:01:48 +0200 X-Priority: 3 (Normal) Original-To: ntg-context@ntg.nl In-Reply-To: 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:15330 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:15330 Sunday, June 6, 2004 Idris Samawi Hamid wrote: > Hi Giuseppe (Is it not way past your bedtime;->), Yes it is, and it shows. But since I'm up and not having any particular urge to go to bed in this very moment, here's a tested alternative that works here: == #!/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); === to be used as utf2tex filename If you want to add more conversions, open your unicode file in an hex editor and check the actual byte-per-byte hex value of the utf text for the other characters you want to add. This should be enough for your needs. -- Giuseppe "Oblomov" Bilotta