From 3960c2f7a73095b502d7bb3657a56d91342fb79f Mon Sep 17 00:00:00 2001 From: naruse Date: Mon, 1 Sep 2008 08:24:55 +0000 Subject: [PATCH] * enc/euc_jp.c (euc-jp-ms): euc-jp-ms is not EUC-JP not an alias of eucJP-ms. * enc/trans/japanese.trans (eucJP-ms): eucJP-ms is the correct name of the encoding in Ruby. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 8 ++++++++ enc/euc_jp.c | 2 +- enc/trans/japanese.trans | 4 ++-- test/ruby/test_transcode.rb | 7 +++++++ 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2a21e205d2..f9a89eefea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Mon Sep 1 17:07:23 2008 NARUSE, Yui + + * enc/euc_jp.c (euc-jp-ms): euc-jp-ms is not EUC-JP not an alias of + eucJP-ms. + + * enc/trans/japanese.trans (eucJP-ms): eucJP-ms is the correct + name of the encoding in Ruby. + Mon Sep 1 16:48:50 2008 Nobuyoshi Nakada * ext/digest/md5/md5init.c (md5), ext/digest/rmd160/rmd160init.c diff --git a/enc/euc_jp.c b/enc/euc_jp.c index ea073666f5..fb8bf41c25 100644 --- a/enc/euc_jp.c +++ b/enc/euc_jp.c @@ -377,7 +377,7 @@ ENC_ALIAS("eucJP", "EUC-JP") /* UI-OSF Application Platform Profile for Japanese * Link: http://ja.wikipedia.org/wiki/EUC-JP */ ENC_REPLICATE("eucJP-ms", "EUC-JP") /* TOG/JVC CDE/Motif Technical WG */ -ENC_ALIAS("euc-jp-ms", "EUC-JP") +ENC_ALIAS("euc-jp-ms", "eucJP-ms") /* * Name: CP51932 diff --git a/enc/trans/japanese.trans b/enc/trans/japanese.trans index 42d3ffb483..796098c9c2 100644 --- a/enc/trans/japanese.trans +++ b/enc/trans/japanese.trans @@ -31,7 +31,7 @@ citrus_decode_mapsrc("euc", 0x0080, "JISX0201-KANA/UCS") + citrus_decode_mapsrc("euc", 0x8000, "JISX0212/UCS") - transcode_tblgen "EUC-JP-MS", "UTF-8", + transcode_tblgen "eucJP-ms", "UTF-8", [["{00-7f}", :nomap]] + citrus_decode_mapsrc("euc", 0x8080, "JISX0208VDC:NEC/UCS,JISX0208UDC/UCS,JISX0208:MS/UCS") + citrus_decode_mapsrc("euc", 0x0080, "JISX0201-KANA/UCS") + @@ -49,7 +49,7 @@ citrus_decode_mapsrc("euc", 0x0080, "UCS/JISX0201-KANA") + citrus_decode_mapsrc("euc", 0x8000, "UCS/JISX0212") - transcode_tblgen "UTF-8", "EUC-JP-MS", + transcode_tblgen "UTF-8", "eucJP-ms", [["{00-7f}", :nomap]] + citrus_decode_mapsrc("euc", 0x8080, "UCS/JISX0208:MS,UCS/JISX0208VDC:NEC,UCS/JISX0208UDC") + citrus_decode_mapsrc("euc", 0x0080, "UCS/JISX0201-KANA") + diff --git a/test/ruby/test_transcode.rb b/test/ruby/test_transcode.rb index 6f578f875d..d03ccac143 100644 --- a/test/ruby/test_transcode.rb +++ b/test/ruby/test_transcode.rb @@ -427,6 +427,13 @@ class TestTranscode < Test::Unit::TestCase check_both_ways("\u795E\u6797\u7FA9\u535A", "\xBF\xC0\xCE\xD3\xB5\xC1\xC7\xEE", 'euc-jp') # 神林義博 end + def test_eucjp_ms + check_both_ways("\u2116", "\xAD\xE2", 'eucJP-ms') # NUMERO SIGN + check_both_ways("\u221A", "\xA2\xE5", 'eucJP-ms') # SQUARE ROOT + check_both_ways("\u3231", "\xAD\xEA", 'eucJP-ms') # PARENTHESIZED IDEOGRAPH STOCK + check_both_ways("\uFF5E", "\xA1\xC1", 'eucJP-ms') # WAVE DASH + end + def test_iso_2022_jp assert_raise(Encoding::InvalidByteSequence) { "\x1b(A".encode("utf-8", "iso-2022-jp") } assert_raise(Encoding::InvalidByteSequence) { "\x1b$(A".encode("utf-8", "iso-2022-jp") }