[MacRuby-devel] MacRuby 0.6 and iconv

Yvon Thoraval yvon.thoraval at gmail.com
Mon Mar 29 08:24:22 PDT 2010


Hey all,

i think i've successfully install MacRuby from svn (revision 3886) :

zsh-% which macruby
/usr/local/bin/macruby
zsh-% macruby -v
MacRuby version 0.6 (ruby 1.9.0) [universal-darwin10.0, x86_64]

however i got :

[1]    18359 abort      ./change_signature_macruby.rb


this is due to the line :

la[i] = Iconv.new('MacRoman',
'UTF-8').iconv(signature.split(/#{LF}/).join(CR))

where :

LF = 10.chr
CR = 13.chr

and signature is an UTF-8 String which i want to transcode to MacRoman.

the first lines of this script being :

#! /usr/local/bin/macruby
# encoding: utf-8

require 'rubygems'
require 'iconv'

Am I doing something wrong with Iconv ?

best,

Yvon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20100329/6bec4ed5/attachment.html>


More information about the MacRuby-devel mailing list