Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Mar 2008 21:26:11 +0900
From:      Alexander Nedotsukov <bland@bbnest.net>
To:        yes298 yes298 <yes298@gmail.com>
Cc:        gnome@freebsd.org
Subject:   Re: iconv can NOT work properly ...
Message-ID:  <EAD52120-574E-4C25-A109-57488BDE9EB3@bbnest.net>
In-Reply-To: <1f873bfb0803151950o4a33b838n57f595e182e8f071@mail.gmail.com>
References:  <1f873bfb0803130226k54ff8ffav1d7d8d0bd278730e@mail.gmail.com> <723D9E97-C94F-4859-A578-B4478B764F43@bbnest.net> <1f873bfb0803151950o4a33b838n57f595e182e8f071@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

What you trying to do is to convert Simplified Chinese to Traditional =20=

Chinese which is not always possible. And strictly speaking is not =20
clearly fits into iconv() domain. For detailed explanation please read =20=

here http://en.wikipedia.org/wiki/Simplified_Chinese_character

All the best,
Alexander.

On 16.03.2008, at 11:50, yes298 yes298 wrote:

> Hi, Alexander,
>
> thanks so much for your attention.
>
> Please found that attached file gb2312.txt for your testing ....
> On Linux Fedora Code 5, using below command can successfully
> convert gb2312 to big5 correctly, but failed on FreeBSD v7.0(x64):
>       iconv -f gb2312 -t big5 sc.txt >big5.txt
>
> On FreeBSD, when using the above command, it showed:
> # iconv -f gb2312 -t big5 sc.txt >big5.txt
> iconv: gb2312.txt:2:0: cannot convert
>
> On Linux, below is the result by using the command you requested:
> # cat gb2312.txt  | iconv -f gb2312 -t big5
> =90=DB=87=F8=D4=8A=C8=CB
> and the content of gb2312 should be:
> =B0=AE=B9=FA=CA=AB=C8=CB
>
> I believe that maybe the problem of FreeBSD libiconv, which don't =20
> provide
> mapping table for convert between gb2312 and big5 ...
>
> Thanks & best rgd,
> Victor
>
>
> 2008/3/15, Alexander Nedotsukov <bland@bbnest.net>:
> Hi,
>
> Please show us your gb2312 code snippet which can not be converted =20
> with:
>
> $ cat you_code_snippet.txt  | iconv -f gb2312 -t big5
>
> Thanks,
> Alexander.
>
> On 13.03.2008, at 18:26, yes298 yes298 wrote:
>
> > Dear Sir,
> >
> > Our company PHP programs developed on Linux, and work normally,
> > but when move to FreeBSD v7.0(x64), I found that iconv() function
> > can't
> > work properly,  funciton iconv() and mb_convert_encoding() can =20
> convert
> > gb2312 or big5 to utf8 properly, but can NOT convert between gb2312
> > and big5, not nothing include error message to show ...
> >
> > Then I do same testing on FreeBSD with command iconv , also failed
> > to convert between gb2312 and big5, and error message show:
> > iconv: cannot convert
> >
> > Using php function 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 =20=

> as
> > below:
> > array(11) { [0]=3D> string(5) "iconv" [1]=3D> string(16)
> > "ob_iconv_handler"
> > [2]=3D> string(18) "iconv_get_encoding" [3]=3D> string(18)
> > "iconv_set_encoding" [4]=3D> string(12) "iconv_strlen" [5]=3D> =20
> string(12)
> > "iconv_substr" [6]=3D> string(12) "iconv_strpos" [7]=3D> string(13)
> > "iconv_strrpos" [8]=3D> string(17) "iconv_mime_encode" [9]=3D> =20
> string(17)
> > "iconv_mime_decode" [10]=3D> string(25) "iconv_mime_decode_headers" =
}
> >
> > As a result, I found  funciton iconv() and mb_convert_encoding()   =20=

> and
> > FreeBSD
> > command iconv can NOT convert between gb2312 and big5.
> >
> > Please help to fix this problem, thanks  so much for your help ...
> >
> > Best rgd,
> > Victor
> > _______________________________________________
> > freebsd-gnome@freebsd.org mailing list
> > http://lists.freebsd.org/mailman/listinfo/freebsd-gnome
> > To unsubscribe, send any mail to =
"freebsd-gnome-unsubscribe@freebsd.org
> > "
>
>
> <gb2312.txt>




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?EAD52120-574E-4C25-A109-57488BDE9EB3>