blob: 89b4b3329ca09a853ad4c6aa7d362d26b386940f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
$NetBSD: patch-aj,v 1.1 2004/12/05 17:25:53 taca Exp $
--- lib/rexml/encodings/SHIFT-JIS.rb.orig 2003-12-13 09:31:22.000000000 +0900
+++ lib/rexml/encodings/SHIFT-JIS.rb
@@ -5,11 +5,11 @@ begin
module Encoding
@@__REXML_encoding_methods =<<-EOL
def decode(str)
- return Iconv::iconv("utf-8", "shift-jis", str)[0]
+ return Iconv::iconv("utf-8", "shift_jis", str)[0]
end
def encode content
- return Iconv::iconv("shift-jis", "utf-8", content)[0]
+ return Iconv::iconv("shift_jis", "utf-8", content)[0]
end
EOL
end
@@ -21,11 +21,11 @@ rescue LoadError
module REXML
module Encoding
@@__REXML_encoding_methods =<<-EOL
- def to_shift_jis content
+ def encode content
Uconv::u8tosjis(content)
end
- def from_shift_jis(str)
+ def decode(str)
Uconv::sjistou8(str)
end
EOL
|