1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/nkf/lib/kconv.rb (Kconv::RegexpEucjp): second byte is up to

0xfe.

* ext/nkf/lib/kconv.rb (Kconv#kconv): should handle UTF8 and UTF16
  properly.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2004-12-28 06:26:34 +00:00
parent aa16b1de7d
commit 6d516d712a
2 changed files with 14 additions and 4 deletions

View file

@ -1,3 +1,11 @@
Tue Dec 28 15:25:20 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/nkf/lib/kconv.rb (Kconv::RegexpEucjp): second byte is up to
0xfe.
* ext/nkf/lib/kconv.rb (Kconv#kconv): should handle UTF8 and UTF16
properly.
Tue Dec 28 13:35:20 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/zlib/zlib.c (rb_deflate_s_deflate, rb_inflate_s_inflate): ensure

View file

@ -74,8 +74,8 @@ module Kconv
RegexpEucjp = /\A(?:
[\x00-\x7f] |
\x8e [\xa1-\xdf] |
\x8f [\xa1-\xdf] [\xa1-\xdf] |
[\xa1-\xdf] [\xa1-\xdf]
\x8f [\xa1-\xdf] [\xa1-\xfe] |
[\xa1-\xdf] [\xa1-\xfe]
)*\z/nx
RegexpUtf8 = /\A(?:
[\x00-\x7f] |
@ -101,8 +101,9 @@ module Kconv
when ::NKF::SJIS
opt << 'S'
when ::NKF::UTF8
when ::NKF::UTF16
opt << 'W'
when ::NKF::UTF16
opt << 'W16'
end
case out_code
@ -113,8 +114,9 @@ module Kconv
when ::NKF::SJIS
opt << 's'
when ::NKF::UTF8
when ::NKF::UTF16
opt << 'w'
when ::NKF::UTF16
opt << 'w16'
when ::NKF::NOCONV
return str
end