Re: Iconv and incompatible encodings
- From: Davi Barbosa <d.barbosa+ruby@xxxxxxxxx>
- Date: Mon, 13 Oct 2008 12:48:17 -0500
I have also a problem with iconv. I'm under linux (configured with utf-8
as usual) and under irb I get:
irb(main):016:0> Iconv.conv("US-ASCII//TRANSLIT","UTF-8",'éèêë')
=> "eeee"
But when I try the same in ruby or mod_ruby I get '????', for example:
$ ruby -e "require 'iconv'; puts
Iconv.conv('US-ASCII//TRANSLIT','UTF-8','éèêë')"
????
I already checked with str.each_byte {|x| puts x} and the strings are
exactly the same. Does anyone have any idea why I get two different
answers from Iconv?
My system:
$ irb --version
irb 0.9.5(05/04/13)
$ ruby --version
ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux]
I have ENV['LANG']==en_US.UTF-8 in both cases.
--
Posted via http://www.ruby-forum.com/.
.
- Follow-Ups:
- Re: Iconv and incompatible encodings
- From: James Gray
- Re: Iconv and incompatible encodings
- Prev by Date: Re: Accessing Ruby Object in Memory
- Next by Date: Re: Ruby Audio API
- Previous by thread: Accessing Ruby Object in Memory
- Next by thread: Re: Iconv and incompatible encodings
- Index(es):
Relevant Pages
|