NetBSD Problem Report #28535
From obata@miki.lins.jp Sat Dec 4 12:11:18 2004
Return-Path: <obata@miki.lins.jp>
Received: from miki.lins.jp (cb8ab2-008.tiki.ne.jp [203.138.178.8])
by narn.netbsd.org (Postfix) with ESMTP id 1A31025217E
for <gnats-bugs@gnats.NetBSD.org>; Sat, 4 Dec 2004 12:11:18 +0000 (UTC)
Message-Id: <200412041211.iB4CBAn6012911@miki.lins.jp>
Date: Sat, 4 Dec 2004 21:11:11 +0900 (JST)
From: obata@zit.to
To: gnats-bugs@netbsd.org
Subject: textproc/ruby-rexml 3.1.2 fail to handle shift_jis code
X-Send-Pr-Version: 3.95
>Number: 28535
>Category: pkg
>Synopsis: textproc/ruby-rexml 3.1.2 fail to handle shift_jis code
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: pkg-manager
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Dec 04 12:12:00 +0000 2004
>Closed-Date: Mon Dec 06 00:07:27 +0000 2004
>Last-Modified: Mon Dec 06 00:07:27 +0000 2004
>Originator: OBATA Akio
>Release: NetBSD 2.0_RC4
>Organization:
GURU-GURU
>Environment:
System: NetBSD miki 2.0_RC4 NetBSD 2.0_RC4 (MIKI) #1: Sun Oct 10 23:09:39 JST 2004 obata@miki:/usr/src/sys/arch/i386/compile/MIKI i386
Architecture: i386
Machine: i386
>Description:
ruby-rexml can't handle shift_jis codes correctly on NetBSD.
1. encoding name for iconv (shift-jis -> shift_jis)
2. typo & bugs in ruby-rexml 3.1.2
>How-To-Repeat:
use XML files in shift_jis encoding.
>Fix:
patches
--- src/rexml/encodings/SHIFT-JIS.rb.orig 2004-06-21 01:04:48.000000000 +0900
+++ src/rexml/encodings/SHIFT-JIS.rb 2004-09-24 23:39:30.000000000 +0900
@@ -5,11 +5,11 @@
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 @@
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
--- src/rexml/encodings/SHIFT_JIS.rb.orig 2004-06-21 01:04:47.000000000 +0900
+++ src/rexml/encodings/SHIFT_JIS.rb 2004-09-07 10:08:03.000000000 +0900
@@ -1 +1 @@
-require 'rexml/encodings/Shift-JIS'
+load 'rexml/encodings/SHIFT-JIS.rb'
>Release-Note:
>Audit-Trail:
From: Takahiro Kambe <taca@netbsd.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: PR/28535 CVS commit: pkgsrc/textproc/ruby-rexml
Date: Sun, 5 Dec 2004 15:21:06 +0000 (UTC)
Module Name: pkgsrc
Committed By: taca
Date: Sun Dec 5 15:21:06 UTC 2004
Modified Files:
pkgsrc/textproc/ruby-rexml: Makefile distinfo
Added Files:
pkgsrc/textproc/ruby-rexml/patches: patch-ab patch-ac
Log Message:
Apply patch from PR pkg/28535.
- Fix Iconv::iconv error with "Shift_JIS" processing.
- Fix method name mistake.
- Since encoding modulde would be loaded as needs, it should be load
by "load" instead of "require".
Add dependency to ruby-iconv or ruby-uconv package.
Bump package revision.
To generate a diff of this commit:
cvs rdiff -r1.4 -r1.5 pkgsrc/textproc/ruby-rexml/Makefile
cvs rdiff -r1.2 -r1.3 pkgsrc/textproc/ruby-rexml/distinfo
cvs rdiff -r0 -r1.1 pkgsrc/textproc/ruby-rexml/patches/patch-ab \
pkgsrc/textproc/ruby-rexml/patches/patch-ac
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: taca@netbsd.org
State-Changed-When: Mon, 06 Dec 2004 00:07:27 +0000
State-Changed-Why:
Patch applied. Thanks for your problem report.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.