ruby-changes:6779
From: naruse <ko1@a...>
Date: Thu, 31 Jul 2008 20:08:17 +0900 (JST)
Subject: [ruby-changes:6779] Ruby:r18295 (trunk): * test/ruby/test_transcode.rb (test_unicode_public_review_issue_121):
naruse 2008-07-31 20:08:04 +0900 (Thu, 31 Jul 2008) New Revision: 18295 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=18295 Log: * test/ruby/test_transcode.rb (test_unicode_public_review_issue_121): fix option1 and 3. Modified files: trunk/ChangeLog trunk/test/ruby/test_transcode.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 18294) +++ ChangeLog (revision 18295) @@ -1,3 +1,8 @@ +Thu Jul 31 20:05:56 2008 NARUSE, Yui <naruse@r...> + + * test/ruby/test_transcode.rb (test_unicode_public_review_issue_121): + fix option1 and 3. + Thu Jul 31 19:54:57 2008 NARUSE, Yui <naruse@r...> * transcode.c (get_replacement_character): use U+FFFD as replacement @@ -17,7 +22,7 @@ Thu Jul 31 16:37:03 2008 NARUSE, Yui <naruse@r...> * test/rubygems/test_gem_ext_configure_builder.rb - (test_self_build_fail): remove extra newline. + (test_self_build_fail): remove extra newline. [ruby-dev:35704] Thu Jul 31 15:11:11 2008 Martin Duerst <duerst@i...> Index: test/ruby/test_transcode.rb =================================================================== --- test/ruby/test_transcode.rb (revision 18294) +++ test/ruby/test_transcode.rb (revision 18295) @@ -313,13 +313,13 @@ end def test_unicode_public_review_issue_121 # see http://www.unicode.org/review/pr-121.html - # assert_equal("\x00\x61\x00?\x00\x62".force_encoding('UTF-16BE'), + # assert_equal("\x00\x61\xFF\xFD\x00\x62".force_encoding('UTF-16BE'), # "\x61\xF1\x80\x80\xE1\x80\xC2\x62".encode('UTF-16BE', 'UTF-8', invalid: :replace)) # option 1 assert_equal("\x00\x61\xFF\xFD\xFF\xFD\xFF\xFD\x00\x62".force_encoding('UTF-16BE'), "\x61\xF1\x80\x80\xE1\x80\xC2\x62".encode('UTF-16BE', 'UTF-8', invalid: :replace)) # option 2 assert_equal("\x61\x00\xFD\xFF\xFD\xFF\xFD\xFF\x62\x00".force_encoding('UTF-16LE'), "\x61\xF1\x80\x80\xE1\x80\xC2\x62".encode('UTF-16LE', 'UTF-8', invalid: :replace)) # option 2 - # assert_equal("\x00\x61\x00?\x00?\x00?\x00?\x00?\x00?\x00\x62".force_encoding('UTF-16BE'), + # assert_equal("\x00\x61\xFF\xFD\xFF\xFD\xFF\xFD\xFF\xFD\xFF\xFD\xFF\xFD\x00\x62".force_encoding('UTF-16BE'), # "\x61\xF1\x80\x80\xE1\x80\xC2\x62".encode('UTF-16BE', 'UTF-8', invalid: :replace)) # option 3 end end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/