Project

General

Profile

Actions

Bug #3448

closed

broken iconv library

Bug #3448: broken iconv library

Added by marcandre (Marc-Andre Lafortune) over 15 years ago. Updated over 14 years ago.

Status:
Rejected
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

Updated by naruse (Yui NARUSE) over 15 years ago Actions #1

  • Category changed from lib to ext

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

Updated by akr (Akira Tanaka) over 14 years ago Actions #2

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

Updated by naruse (Yui NARUSE) over 14 years ago Actions #3 [ruby-core:37363]

  • Status changed from Open to Rejected

//ignore is GNU libiconv's feature

Updated by nobu (Nobuyoshi Nakada) over 14 years ago Actions #4 [ruby-core:37622]

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

Actions

Also available in: PDF Atom