From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/15328 Path: main.gmane.org!not-for-mail From: Giuseppe Bilotta Newsgroups: gmane.comp.tex.context Subject: Re[2]: Arabic-utf-8 (plus a sample) Date: Sun, 6 Jun 2004 01:15:56 +0200 Sender: ntg-context-admin@ntg.nl Message-ID: <1579878055.20040606011556@iol.it> References: <1086468099.5707.26.camel@tascomputer.home> <1086472098.5707.36.camel@tascomputer.home> 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 1086477784 3839 80.91.224.253 (5 Jun 2004 23:23:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 5 Jun 2004 23:23:04 +0000 (UTC) Original-X-From: ntg-context-admin@ntg.nl Sun Jun 06 01:22:55 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 1BWkV5-00012O-00 for ; Sun, 06 Jun 2004 01:22:55 +0200 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id 5B32710B46; Sun, 6 Jun 2004 01:22:51 +0200 (MEST) Original-Received: from smtp3.libero.it (smtp3.libero.it [193.70.192.127]) by ref.ntg.nl (Postfix) with ESMTP id A00BA10B21 for ; Sun, 6 Jun 2004 01:20:29 +0200 (MEST) Original-Received: from ppp-133-141.29-151.libero.it (151.29.141.133) by smtp3.libero.it (7.0.027-DD01) id 404F148A01584139 for ntg-context@ntg.nl; Sun, 6 Jun 2004 01:20:28 +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:15328 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:15328 Sunday, June 6, 2004 Idris Samawi Hamid wrote: > Here is the whole file once again: > ================================== > #!/usr/bin/perl -w > use strict; > use open ':utf8'; > open(NEW,">new.tex"); #opens file to print out the result > while (<>); { #this opens the file for reading > $_ =~ s/\x{0627}/\x{0041}/esg; > #this is the actual conversion > print NEW "$_"; > #and this writes the result into file "new.tex" > } > close(NEW); > ================================== My take: try the following (should work even with ActiveState 5.6) === #!/usr/bin/perl use strict; #D comment the following, I think we can do without # use open ':utf8'; open(NEW,">new.tex"); #opens file to print out the result while (<>); { #this opens the file for reading $_ =~ s/\x06\x27/A/esg; #this is the actual conversion print NEW "$_"; #and this writes the result into file "new.tex" } close(NEW); === Save as e.g. idris_conv.pl and issue as perl idris_conv.pl < filename.txt where filename.txt is the filename to convert. -- Giuseppe "Oblomov" Bilotta