Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.ruby > #6752

SOLVED was: script error when thru ssh only

Date Tue, 26 Feb 2013 12:55:35 +0100
From Une Bévue <unbewusst.sein@fai.invalid>
Organization NaN
User-Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130216 Thunderbird/17.0.3
MIME-Version 1.0
Newsgroups comp.lang.ruby
Subject SOLVED was: script error when thru ssh only
References <512b6b84@groumpf.org>
In-Reply-To <512b6b84@groumpf.org>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 8bit
NNTP-Posting-Host 82.226.217.239
X-Original-NNTP-Posting-Host 82.226.217.239
Message-ID <512ca2b7$1@groumpf.org> (permalink)
X-Trace groumpf.org 1361879735 82.226.217.239 (26 Feb 2013 12:55:35 +0100)
Lines 17
X-Authenticated-User yvon
X-Complaints-To abuse@groumpf.org
Path csiph.com!usenet.pasdenom.info!gegeweb.org!groumpf.org!not-for-mail
Xref csiph.com comp.lang.ruby:6752

Show key headers only | View raw


Le 25/02/13 14:47, Une Bévue a écrit :
> /Users/yt/bin/scripts/recette_sources_list.rb:17:in `block in <main>':
> invalid byte sequence in US-ASCII (ArgumentError)
>

I've found a solution, following :
<http://www.ruby-forum.com/topic/178706>

then using one of:

    File.open("....", :encoding => "UTF-8")   # Use this encoding
    File.open("....", :encoding => "ENV")     # Follow the environment
    File.open("....")                         # No idea, treat as binary

--
La philosophie bouche le trou de la politique.
Jacques Lacan

Back to comp.lang.ruby | Previous | NextPrevious in thread | Find similar


Thread

script error when thru ssh only Une Bévue <unbewusst.sein@fai.invalid> - 2013-02-25 14:47 +0100
  SOLVED was: script error when thru ssh only Une Bévue <unbewusst.sein@fai.invalid> - 2013-02-26 12:55 +0100

csiph-web