ISO-8859-16 not supported?

43 views
Skip to first unread message

Federico Tomassetti

unread,
Nov 10, 2013, 5:33:39 AM11/10/13
to rails...@googlegroups.com
Hi,
I understood ISO-8859-16 was among the supported encoding but I get this
error:

Encoding::ConverterNotFoundError: code converter not found for
ISO-8859-16
org/jruby/RubyString.java:7597:in `encode'

On this line:

code = code.encode(internal_encoding) # internal_encoding = 'UTF-8'

I can read the file correctly with:

code = IO.read(path,{ :encoding => file_encoding, :mode => 'rb'}) #
file_encoding = 'ISO-8859-16'

Any thoughts?

--
Posted via http://www.ruby-forum.com/.

"Martin J. Dürst"

unread,
Nov 10, 2013, 8:18:27 PM11/10/13
to rails...@googlegroups.com, Federico Tomassetti, Charles Oliver Nutter, Thomas E Enebo
iso-8859-16 is supported in C Ruby from commit 33993 (Dec. 9th, 2011),
please see
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/enc/trans/iso-8859-16-tbl.rb?view=log.

It looks as if you used JRuby. Can you tell us which version?

It may be that JRuby didn't yet implement ISO-8859-16. I have cc'ed the
JRuby implementers to get their feedback.

Regards, Martin.

Federico Tomassetti

unread,
Nov 11, 2013, 4:28:47 AM11/11/13
to rails...@googlegroups.com
My bad, I was using JRuby 1.7.6, the problems do not appear with the
original Ruby interpreter, version 2.0.

I have already opened an issue for JRuby.

More in details ruby 1.9.3 p 448 gives me this error:
bugtest.rb:2:in `encode': code converter not found (ISO-8859-16 to
UTF-8) (Encoding::ConverterNotFoundError)
from bugtest.rb:2:in `<main>'

Which seems to me more detailed in respect to the JRuby error.

Encoding::ConverterNotFoundError: code converter not found for
ISO-8859-16
encode at org/jruby/RubyString.java:7597
(root) at bugtest.rb:2

Ruby 2.0 runs smoothly instead, no errors raised.
Reply all
Reply to author
Forward
0 new messages