Project

General

Profile

Bug #3448

broken iconv library

Added by marcandre (Marc-Andre Lafortune) over 9 years ago. Updated about 8 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
all
Backport:
[ruby-core:30787]

Description

=begin
Texts longer than ~8160 characters can create problems with iconv on some distributions:

require 'iconv'
Iconv.conv("iso-8859-1//ignore", "utf-8", "\305\253" + "a"*8159).size #=> 8159
Iconv.conv("iso-8859-1//ignore", "utf-8", "\305\253" + "a"*8160).size # => Iconv::IllegalSequence: "a"

The code above is from Debian 4 and 5 (on Heroku...), but it works as expected on OS X. As such, it affects Ruby 1.8 and 1.9

A google search reassured me I was not crazy, e.g. my_iconv_open in:
http://www.opensource.apple.com/source/vim/vim-6/vim/src/mbyte.c

I realize this is somewhat a third party issue, but I'm logging this nevertheless, as a brave soul might bypass the bug in the Ruby library and/or report this to the proper authorities.
--
Marc-André
=end

History

#1

Updated by naruse (Yui NARUSE) over 9 years ago

  • Category changed from lib to ext

=begin
It seems glibc iconv's bug; Mac OS X, FreeBSD and so on use GNU libiconv.
=end

#2

Updated by akr (Akira Tanaka) about 8 years ago

  • Project changed from Ruby to Ruby master
  • Category changed from ext to ext

Updated by naruse (Yui NARUSE) about 8 years ago

  • Status changed from Open to Rejected

//ignore is GNU libiconv's feature

Updated by nobu (Nobuyoshi Nakada) about 8 years ago

iconv is a legacy library and will be removed from future releases, so its use is strongly discouraged.

Also available in: Atom PDF