Issue #6675 has been updated by mghomn (Justin Peal).


# Because GBK is narrow, now I use GB18030 to avoid this error. :-)

#!/usr/bin/env ruby -w
# encoding: utf-8

require 'test/unit'

class Tests < Test::Unit::TestCase
  def test_gbk
    "\ue863".encode('gb18030').encode('utf-8')
  end
end
----------------------------------------
Bug #6675: Raise exception when convert encoding of a character from GBK to UTF
https://bugs.ruby-lang.org/issues/6675#change-34461

Author: mghomn (Justin Peal)
Status: Rejected
Priority: Normal
Assignee: 
Category: 
Target version: 
ruby -v: ruby 1.9.3p194 (2012-04-20) [i386-mingw32]


#!/usr/bin/env ruby -w
# encoding: utf-8

require 'test/unit'

class Tests < Test::Unit::TestCase
  def test_gbk
    assert_raise Encoding::UndefinedConversionError do
      "\ue863".encode('gbk').encode('utf-8')
    end
  end
end



-- 
http://bugs.ruby-lang.org/