From turutani@scphys.kyoto-u.ac.jp  Wed Apr 15 03:02:02 2009
Return-Path: <turutani@scphys.kyoto-u.ac.jp>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 44FF5106566B
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 15 Apr 2009 03:02:02 +0000 (UTC)
	(envelope-from turutani@scphys.kyoto-u.ac.jp)
Received: from smtp-auth.kuins.kyoto-u.ac.jp (smtp-auth.kuins.kyoto-u.ac.jp [130.54.120.65])
	by mx1.freebsd.org (Postfix) with ESMTP id B9D9B8FC1C
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 15 Apr 2009 03:02:01 +0000 (UTC)
	(envelope-from turutani@scphys.kyoto-u.ac.jp)
Received: from h120.65.226.10.32118.vlan.kuins.net (wd250.AFL2.vectant.ne.jp [220.247.107.250])
	by smtp-auth.kuins.kyoto-u.ac.jp (Postfix) with ESMTP id 45FE7A9006B;
	Wed, 15 Apr 2009 12:01:55 +0900 (JST)
Received: from h120.65.226.10.32118.vlan.kuins.net (localhost [127.0.0.1])
	by h120.65.226.10.32118.vlan.kuins.net (8.14.3/8.14.3/20071004-1) with ESMTP id n3F31o24082707;
	Wed, 15 Apr 2009 12:01:50 +0900 (JST)
	(envelope-from turutani@h120.65.226.10.32118.vlan.kuins.net)
Received: (from turutani@localhost)
	by h120.65.226.10.32118.vlan.kuins.net (8.14.3/8.14.3/Submit) id n3F31n62082706;
	Wed, 15 Apr 2009 12:01:49 +0900 (JST)
	(envelope-from turutani)
Message-Id: <200904150301.n3F31n62082706@h120.65.226.10.32118.vlan.kuins.net>
Date: Wed, 15 Apr 2009 12:01:49 +0900 (JST)
From: Tsurutani Naoki <turutani@scphys.kyoto-u.ac.jp>
Reply-To: Tsurutani Naoki <turutani@scphys.kyoto-u.ac.jp>
To: FreeBSD-gnats-submit@freebsd.org
Cc: turutani@scphys.kyoto-u.ac.jp
Subject: fix some bugs in japanese/nkf
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         133738
>Category:       ports
>Synopsis:       fix some bugs in japanese/nkf
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    nork
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Apr 15 03:10:01 UTC 2009
>Closed-Date:    Mon Apr 27 13:51:11 UTC 2009
>Last-Modified:  Mon Apr 27 14:00:02 UTC 2009
>Originator:     Tsurutani Naoki
>Release:        FreeBSD 7.1-STABLE i386
>Organization:
>Environment:
System: FreeBSD h120.65.226.10.32118.vlan.kuins.net 7.1-STABLE FreeBSD 7.1-STABLE #17: Wed Jan 7 11:14:01 JST 2009 turutani@h120.65.226.10.32118.vlan.kuins.net:/usr/local/work/usr/obj/usr/src/sys/POLYMER i386


	
>Description:
	japanese/nkf and japanese/p5-nkf contains some bugs arround UTF-16 etc.
	
>How-To-Repeat:
	
>Fix:
	some fixes are already incorporated into original git tree.
	here is a patch, which should be saved as japanese/nkf/files/patch-209fix:

diff -urBbN nkf-2.0.9/nkf.c nkf.cur/nkf.c
--- ./nkf.c.orig	2009-01-20 18:49:31.000000000 +0900
+++ ./nkf.c	2009-02-21 15:51:20.000000000 +0900
@@ -21,7 +21,7 @@
  * 3. This notice may not be removed or altered from any source distribution.
  */
 #define NKF_VERSION "2.0.9"
-#define NKF_RELEASE_DATE "2009-01-20"
+#define NKF_RELEASE_DATE "2009-02-21"
 #define COPY_RIGHT \
     "Copyright (C) 1987, FUJITSU LTD. (I.Ichikawa).\n" \
     "Copyright (C) 1996-2009, The nkf Project."
@@ -468,6 +468,8 @@
     {"Shift_JIS", 0, 0, 0, {0, 0, 0}, s_status, s_iconv, 0},
 #ifdef UTF8_INPUT_ENABLE
     {"UTF-8",     0, 0, 0, {0, 0, 0}, w_status, w_iconv, 0},
+    {"UTF-16",     0, 0, 0, {0, 0, 0}, NULL, w_iconv16, 0},
+    {"UTF-32",     0, 0, 0, {0, 0, 0}, NULL, w_iconv32, 0},
 #endif
     {0}
 };
@@ -1426,6 +1428,7 @@
 	output_endian = ENDIAN_LITTLE;
 	output_bom_f = TRUE;
 	break;
+    case UTF_32:
     case UTF_32BE_BOM:
 	output_bom_f = TRUE;
 	break;
@@ -6159,9 +6162,6 @@
 		    output_endian = ENDIAN_LITTLE;
 		} else if (cp[0] == 'B') {
 		    cp++;
-		} else {
-		    output_encoding = nkf_enc_from_index(enc_idx);
-		    continue;
 		}
 		if (cp[0] == '0'){
 		    cp++;
@@ -6232,6 +6232,7 @@
 	    while ('0'<= *cp && *cp <='9') {
 		alpha_f |= 1 << (*cp++ - '0');
 	    }
+	    if (alpha_f & ((1 << 2) | (1 << 3))) alpha_f |= 1;
 	    if (!alpha_f) alpha_f = 1;
 	    continue;
 	case 'x':   /* Convert X0201 kana to X0208 or X0201 Conversion */
	


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->nork 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Wed Apr 15 03:27:08 UTC 2009 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=133738 
State-Changed-From-To: open->closed 
State-Changed-By: nork 
State-Changed-When: Mon Apr 27 13:50:56 UTC 2009 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=133738 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/133738: commit references a PR
Date: Mon, 27 Apr 2009 13:50:21 +0000 (UTC)

 nork        2009-04-27 13:50:06 UTC
 
   FreeBSD ports repository
 
   Modified files:
     japanese/nkf         Makefile 
   Added files:
     japanese/nkf/files   patch-nkf.c 
     japanese/p5-nkf/files patch-nkf.c 
   Log:
   Fix some bugs.
   
   PR:             ports/133738
   Submitted by:   Tsurutani Naoki  turutani at scphys kyoto-u ac jp
   Obtained from:  nkf's git
   
   Revision  Changes    Path
   1.36      +1 -0      ports/japanese/nkf/Makefile
   1.3       +46 -0     ports/japanese/nkf/files/patch-nkf.c (new)
   1.3       +46 -0     ports/japanese/p5-nkf/files/patch-nkf.c (new)
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
