From nobody@FreeBSD.org  Thu Mar 13 09:08:58 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6BF0E1065670
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 13 Mar 2008 09:08:58 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 620788FC40
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 13 Mar 2008 09:08:58 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m2D95e3K078102
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 13 Mar 2008 09:05:40 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id m2D95eDU078101;
	Thu, 13 Mar 2008 09:05:40 GMT
	(envelope-from nobody)
Message-Id: <200803130905.m2D95eDU078101@www.freebsd.org>
Date: Thu, 13 Mar 2008 09:05:40 GMT
From: Peter <yes298@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: iconv is NOT working
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         121663
>Category:       ports
>Synopsis:       converters/iconv is NOT working
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bland
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar 13 09:10:00 UTC 2008
>Closed-Date:    Thu Mar 20 03:41:15 UTC 2008
>Last-Modified:  Thu Mar 20 03:41:15 UTC 2008
>Originator:     Peter
>Release:        FreeBSD v7.0 (x64)
>Organization:
>Environment:
FreeBSD dl.dreamlove.hk 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Sun Feb 24 10:35:36 UTC 2008     root@driscoll.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
on FreeBSD 6.2(x64) and 7.0(x64), use phpinfo() show that iconv() is
enabled, but it can NOT work properly, only big5 or gb2312 can convert to
utf-8 successfully, but can NOT convert between big5 and gb2312 or gbk.

phpinfo() result as below:

iconv support  enabled  
iconv implementation  libiconv  
iconv library version  1.11  

Directive Local Value Master Value 
iconv.input_encoding ISO-8859-1 ISO-8859-1 
iconv.internal_encoding ISO-8859-1 ISO-8859-1 
iconv.output_encoding ISO-8859-1 ISO-8859-1 

Using function var_dump(get_extension_funcs("iconv")); to get info as
below:

array(11) { [0]=> string(5) "iconv" [1]=> string(16) "ob_iconv_handler"
[2]=> string(18) "iconv_get_encoding" [3]=> string(18)
"iconv_set_encoding" [4]=> string(12) "iconv_strlen" [5]=> string(12)
"iconv_substr" [6]=> string(12) "iconv_strpos" [7]=> string(13)
"iconv_strrpos" [8]=> string(17) "iconv_mime_encode" [9]=> string(17)
"iconv_mime_decode" [10]=> string(25) "iconv_mime_decode_headers" } 
----------------------------------------------------------------------------

Even on FreeBSD, using command iconv to convert gb2312 file to big5 file or
convert big5 file to gb2312 file, both are failed.
iconv -f GB2312 -t big5 2312.php > b5.php
iconv -f big5 -t GB2312 b52.php > gb.php

Error message: iconv: cannot convert



>How-To-Repeat:
do the testing many times.
>Fix:
I completely don't know how to fix
and waiting for help ...


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-amd64->bland 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sun Mar 16 07:26:33 UTC 2008 
Responsible-Changed-Why:  
Make this a ports PR and assign. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=121663 
State-Changed-From-To: open->closed 
State-Changed-By: bland 
State-Changed-When: Thu Mar 20 03:38:12 UTC 2008 
State-Changed-Why:  
This is missfiled PR (actual port is converters/libiconv). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=121663 
>Unformatted:
