A
AEtzold
Dear all,
when using Iconv, I am repeatedly running into
problems.
I tried to run this bit of code:
#!/usr/bin/env ruby
$KCODE = 'u'
require 'iconv'
s = 'caffè'
ic_ignore = Iconv.new('US-ASCII//IGNORE', 'UTF-8')
puts ic_ignore.iconv(s) # => caff
ic_translit = Iconv.new('US-ASCII//TRANSLIT', 'UTF-8')
puts ic_translit.iconv(s) # => caff`e
(from here:
http://www.ruby-forum.com/topic/70827),
but instead of the promised result in the comments above,
I am getting:
corr_ebook.rb:29:in `iconv': "\351" (Iconv::InvalidCharacter)
from corr_ebook.rb:29
Why ?
I am using ruby 1.8.6 (2007-03-13 patchlevel 0) [x86_64-linux] (OpenSuse 10.2)
Thank you very much!
Best regards,
Axel
when using Iconv, I am repeatedly running into
problems.
I tried to run this bit of code:
#!/usr/bin/env ruby
$KCODE = 'u'
require 'iconv'
s = 'caffè'
ic_ignore = Iconv.new('US-ASCII//IGNORE', 'UTF-8')
puts ic_ignore.iconv(s) # => caff
ic_translit = Iconv.new('US-ASCII//TRANSLIT', 'UTF-8')
puts ic_translit.iconv(s) # => caff`e
(from here:
http://www.ruby-forum.com/topic/70827),
but instead of the promised result in the comments above,
I am getting:
corr_ebook.rb:29:in `iconv': "\351" (Iconv::InvalidCharacter)
from corr_ebook.rb:29
Why ?
I am using ruby 1.8.6 (2007-03-13 patchlevel 0) [x86_64-linux] (OpenSuse 10.2)
Thank you very much!
Best regards,
Axel