From: "mame (Yusuke Endoh)" Date: 2012-11-02T20:22:00+09:00 Subject: [ruby-core:48754] [ruby-trunk - Bug #6675][Rejected] Raise exception when convert encoding of a character from GBK to UTF Issue #6675 has been updated by mame (Yusuke Endoh). Status changed from Feedback to Rejected No feedback, closing. 2012/7/2 "Martin J. D��rst" : > \ue863 is in the Unicode private use area. Therefore, conversion to GBK > should not succeed. I get Encoding::UndefinedConversionError just for > ruby -e '"\ue863".encode("gbk")' > > I don't understand why the title of the bug is "when convert ... from GBK to > UTF-8". The last method call of the test, .encode('utf-8'), is quite > irrelevant. Justin, can you explain what you want? I guess Justen expected round-trip. -- Yusuke Endoh ---------------------------------------- Bug #6675: Raise exception when convert encoding of a character from GBK to UTF https://bugs.ruby-lang.org/issues/6675#change-32233 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/