From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/52168 Path: news.gmane.org!not-for-mail From: Jose Augusto Newsgroups: gmane.comp.tex.context Subject: Re: Ruby 1.9.1 and non-ascii char parsing in .tui file Date: Mon, 10 Aug 2009 19:11:00 +0100 Message-ID: <1781d7210908101111w29711127g8f362ceaf7f472de@mail.gmail.com> References: <1781d7210908081216n46c62018kb3a5f14643afb396@mail.gmail.com> <4A7F2A0D.2010907@wxs.nl> <1781d7210908092015n2d57ae21n6f09fd66729e41ac@mail.gmail.com> <4A801C60.8030501@wxs.nl> <1781d7210908100821s1c343d9j95aa4bffe9d7db92@mail.gmail.com> <4A804A79.4070904@wxs.nl> <1781d7210908101020y1fd9611du529f65cc6553bc4c@mail.gmail.com> <4A805B35.8020602@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0504657623==" X-Trace: ger.gmane.org 1249927880 16172 80.91.229.12 (10 Aug 2009 18:11:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 10 Aug 2009 18:11:20 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Aug 10 20:11:13 2009 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.50) id 1MaZKy-0007EC-9h for gctc-ntg-context-518@m.gmane.org; Mon, 10 Aug 2009 20:11:12 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 145FBC9A86; Mon, 10 Aug 2009 20:11:09 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Mbc0XmFZjpMg; Mon, 10 Aug 2009 20:11:06 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 664AEC9A77; Mon, 10 Aug 2009 20:11:06 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 487A2C9A77 for ; Mon, 10 Aug 2009 20:11:05 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 8rEX5U4HIE8g for ; Mon, 10 Aug 2009 20:11:02 +0200 (CEST) Original-Received: from mail-fx0-f207.google.com (mail-fx0-f207.google.com [209.85.220.207]) by balder.ntg.nl (Postfix) with ESMTP id 93600C9A68 for ; Mon, 10 Aug 2009 20:11:02 +0200 (CEST) Original-Received: by fxm3 with SMTP id 3so4538365fxm.8 for ; Mon, 10 Aug 2009 11:11:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=yoiEYGMvRbGnPKsfqeaXQdbtP8qcRZjXbJnUiYxXUwU=; b=iaVyCpCexV1Ia7oIkKuPOfal/3ITXubItU5HqOmyFA9/ACmZCJCL9Nz7xVfAvVCkwf Q0iO+oITmhFqEAwlWzSeDLXIv1IM/YnlpvPV016T/B+L0SIFvUym2EnDfU9lzLgl24ak mCfNaQelV6OUX2ZxLJCa5RzVtRwNjaH2WC4a0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=ngBNZLnQPHBKOGPrcpYp8vgYFXHtRlamuYKnsEk7uMov6JceCcOYab6t3EkKgeSGOa odZXf/UDB61UoNdbj/qvK65JjM0lbVd992kQlosxYodxSLtV2bzmYh4DlGYHiwn4gAua lfzv8089jwoUj7hnFCLVIJcguAT724pvF6PpM= Original-Received: by 10.223.111.82 with SMTP id r18mr1034669fap.83.1249927860583; Mon, 10 Aug 2009 11:11:00 -0700 (PDT) In-Reply-To: <4A805B35.8020602@wxs.nl> X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:52168 Archived-At: --===============0504657623== Content-Type: multipart/alternative; boundary=001636c5adce1ffc7b0470cd826f --001636c5adce1ffc7b0470cd826f Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi Hans, I ran just now ruby 1.8.6 and the force_encoding() patch worked well. Just now I upgrade "--context=current". The banner in the texexec.rb is banner = ['TeXExec', 'version 6.2.1', '1997-2009', 'PRAGMA ADE/POD'] and the date of this script (after updating) is 10-04-2009 (its April..) I'm running mkii. How do I get mkii beta scripts, as texexec.rb you mention? All my rubys are compiled from the box with mingw in windows (2000 or XP, in 3 different machines). Of course the encoding thing is different in Linux, Windows (and DOS prompts, for the matter), so there is probably different behavior in ruby/context/tex interaction with chars in Linux and Windows boxes... Thx Jose On Mon, Aug 10, 2009 at 6:39 PM, Hans Hagen wrote: > Jose Augusto wrote: > > Meanwhile I don't think that the magic string >> # encoding: ASCII-8BIT >> solves the problem. This string indicates that the script is written in >> ASCII-8BIT, >> but when is reading the strings from the .tex or .tui files ruby 1.9.1 >> considers >> them as US-ASCII regardless of the encoding declared in # encoding: ... >> > > not when opened as 'rb' (which i do in the latest texexec.rb) so i wonder > why that does not work at your place > > (http://blog.nuclearsquid.com/writings/ruby-1-9-encodings) > > i run ruby 1.8.6 (and on a couple of servers even older versions and i'm > not going to touch ruby on these machines (i don't want to patch scripts > that are supposed to run another 5-10 years) but i might update context and > texexec) > > I introduced " # encoding: ASCII-8BIT " in texmfstart.rb, tex.rb and >> texutil.rb >> and the problem didn't disapeer :-( >> > > hm, it worked here > > Of course I may be wrong. But the experiments I did make me think this >> way. >> Also, I don't have Linux at my disposal (I mean, with context installed) >> and >> there >> the behavior perhaps is different... >> > > that's my biggest fear ... introducing more problems > > > Hans > > > ----------------------------------------------------------------- > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com > | www.pragma-pod.nl > ----------------------------------------------------------------- > > ___________________________________________________________________________________ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : https://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > > ___________________________________________________________________________________ > --001636c5adce1ffc7b0470cd826f Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Hans,

I ran just now ruby 1.8.6 and the force_encoding() patch wo= rked well.

Just now I upgrade "--context=3Dcurrent". The b= anner in the texexec.rb is
banner =3D ['TeXExec', 'version 6= .2.1', '1997-2009', 'PRAGMA ADE/POD']
and the date of this script (after updating) is 10-04-2009 (its April..)
I'm running mkii. How do I get mkii beta scripts, as texexec.rb yo= u mention?

All my rubys are compiled from the box with mingw in wind= ows
(2000 or XP, in 3 different machines). Of course the encoding
thing is = different in Linux, Windows (and DOS prompts, for the matter),
so there = is probably different behavior in ruby/context/tex interaction with
chars in Linux and Windows boxes...

Thx

Jose

On Mon, Aug 10, 2009 at 6:39 PM, Hans Hagen <pragma@wxs.nl> wrot= e:
Jose Augusto wrote:

Meanwhile I don't think that the magic string
# encoding: ASCII-8BIT
solves the problem. This string indicates that the script is written in
ASCII-8BIT,
but when is reading the strings from the .tex or .tui files ruby 1.9.1
considers
them as US-ASCII regardless of the encoding declared in # encoding: ...

not when opened as 'rb' (which i do in the latest texexec.rb) so i = wonder why that does not work at your place

(http://blog.nuclearsquid.com/writings/ruby-1-9-encodings)<= br>
i run ruby 1.8.6 (and on a couple of servers even older versions and i'= m not going to touch ruby on these machines (i don't want to patch scri= pts that are supposed to run another 5-10 years) but i might update context= and texexec)


I introduced " # encoding: ASCII-8BIT =A0" in texmfstart.rb, tex.= rb and
texutil.rb
and the problem didn't disapeer :-(

hm, it worked here


Of course I may be wrong. But the experiments I did make me think this way.=
Also, I don't have Linux at my disposal (I mean, with context installed= ) and
there
the behavior perhaps is different...

that's my biggest fear ... introducing more problems


Hans


-----------------------------------------------------------------
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0Hans Hagen | PRAGMA ADE
=A0 =A0 =A0 =A0 =A0 =A0 =A0Ridderstraat 27 | 8061 GH Hasselt | The Netherl= ands
=A0 =A0 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 | ww= w.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________= ________
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist : ntg-cont= ext@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage =A0: http://= www.pragma-ade.nl / http://tex.aanhet.net
archive =A0: https://foundry.supelec.fr/projects/contextrev/
wiki =A0 =A0 : http:= //contextgarden.net
___________________________________________________________________________= ________

--001636c5adce1ffc7b0470cd826f-- --===============0504657623== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ --===============0504657623==--