blob: 552015aa1cf1f615b2c6bbcafae28a9d96861d6a (
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-ab,v 1.1 2004/12/05 15:21:06 taca Exp $
--- src/rexml/encodings/SHIFT-JIS.rb.orig 2004-06-21 01:04:48.000000000 +0900
+++ src/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
|