[前][次][番号順一覧][スレッド一覧]

ruby-changes:35139

From: nobu <ko1@a...>
Date: Tue, 19 Aug 2014 22:23:13 +0900 (JST)
Subject: [ruby-changes:35139] nobu:r47221 (trunk): euckr-tbl.rb: euro and registered signs

nobu	2014-08-19 22:22:46 +0900 (Tue, 19 Aug 2014)

  New Revision: 47221

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=47221

  Log:
    euckr-tbl.rb: euro and registered signs
    
    * enc/trans/euckr-tbl.rb (EUCKR_TO_UCS_TBL): add missing euro and
      registered signs.  [ruby-core:64452] [Bug #10149]

  Modified files:
    trunk/ChangeLog
    trunk/enc/trans/euckr-tbl.rb
    trunk/test/ruby/enc/test_euc_kr.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 47220)
+++ ChangeLog	(revision 47221)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Tue Aug 19 22:22:45 2014  Nobuyoshi Nakada  <nobu@r...>
+
+	* enc/trans/euckr-tbl.rb (EUCKR_TO_UCS_TBL): add missing euro and
+	  registered signs.  [ruby-core:64452] [Bug #10149]
+
 Tue Aug 19 13:59:43 2014  Nobuyoshi Nakada  <nobu@r...>
 
 	* compar.c (rb_cmperr): preserve encodings of arguments in the
Index: enc/trans/euckr-tbl.rb
===================================================================
--- enc/trans/euckr-tbl.rb	(revision 47220)
+++ enc/trans/euckr-tbl.rb	(revision 47221)
@@ -162,6 +162,8 @@ EUCKR_TO_UCS_TBL = [ https://github.com/ruby/ruby/blob/trunk/enc/trans/euckr-tbl.rb#L162
   ["A2E3",0x33C2],
   ["A2E4",0x33D8],
   ["A2E5",0x2121],
+  ["A2E6",0x20AC],
+  ["A2E7",0x00AE],
   ["A3A1",0xFF01],
   ["A3A2",0xFF02],
   ["A3A3",0xFF03],
Index: test/ruby/enc/test_euc_kr.rb
===================================================================
--- test/ruby/enc/test_euc_kr.rb	(revision 47220)
+++ test/ruby/enc/test_euc_kr.rb	(revision 47221)
@@ -25,4 +25,12 @@ class TestEucKr < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/enc/test_euc_kr.rb#L25
   def test_left_adjust_char_head
     assert_equal(s("\xa1\xa1"), s("\xa1\xa1\xa1\xa1").chop)
   end
+
+  def test_euro_sign
+    assert_equal("\u{20ac}", s("\xa2\xe6").encode("utf-8"))
+  end
+
+  def test_registered_mark
+    assert_equal("\u{00ae}", s("\xa2\xe7").encode("utf-8"))
+  end
 end

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]