Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Sep 2003 16:51:20 +0400
From:      Artem Bityuckiy <dedekind@oktet.ru>
To:        erm@dante.org.uk
Cc:        ports@FreeBSD.org
Subject:   FreeBSD Port: iconv-2.0
Message-ID:  <3F6858C8.3000901@oktet.ru>

next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------080407000002030906070309
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Hello!.  I'm using iconv-2.0 on my Embedded ARM-based system.

It seems that there is a bug in euc-jp concersion. It doesn't work. I am 
sending you the following files:

file_shift_jis  -  Japanese text file in SHIFT-JIS
file_euc_jp  -  the same file in EUC-JP (converted with GNU gconv)
_test.c - the small C test that tries to convert file_shift_jis to 
      	  file_euc_jp (files are represented as arrays there). This 			 
program works well on Linux + gconv.

iconv-2.0 (written by Konstantin Chuguev) can't convert from 
file_shift_jis to file_euc_jp.

I believe that this is not an error that was appiared when iconv-2.0 was 
ported.

Please, reply me as soon as possible. Thanks.

-- 
Best Regards
Artem B. Bityckiy

--------------080407000002030906070309
Content-Type: text/plain;
 name="file_shift_jis"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
 filename="file_shift_jis"

kEaBWINlg0yDWINng3SDQINDg4uPVyBWZXIzLjMgKEMpSEFUDQoNCoKxgsyDQYFbg0qDQ4N1
gsyNxZBWlMWCzYKxgrGCyYKgguiC3IK3gUINCmh0dHA6Ly93d3cwMi5zby1uZXQubmUuanAv
JTdFaGF0L2ZpbGVzL2luZGV4LWouaHRtbA0KDQpjciwgY3JsZiwgbGaDZoNCg4yDToNng4oo
g3SDSIOLg18pgsyT4Jdlgs2Tr4K2gsWCt4KqgUGNc4LMi+aQ2ILogqqCu4LqgryC6g0KQ1Io
TWFjlZcpgUFDUitMRihET1OVlymBQUxGKFVOSViVlymCyYLIgsGCxIKigtyCt4FCDQoNCg0K
anRleHQvDQoNCiAgcmVhZG1lLnR4dCAtLS0giXCM6lJFQURN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GibsgOINyg2KDZ0pJU1gw
MjAxgsaTr4K2DQogIHMwMjA4LnR4dCAtLS0tIEpJUyBYMDIwOCAgICAgICAgIILwIFNoaWZ0
X0pJU4LFlYSNhom7DQoNCmp0ZXh0L290aGVycy8NCg0KICBiNjRqaXMudHh0IC0tLSBJU08t
MjAyMi1KUCAoSklTKSCC8CBiYXNlNjSCxZWEjYaJuw0KICBxdGppcy50eHQgLS0tLSBJU08t
MjAyMi1KUCAoSklTKSCC8CBxdW90ZWQtcHJpbnRhYmxlgsWVhI2GibsNCg0KICBia2V1Yy50
eHQgLS0tLSCJ84Lqgr1FVUMtSlAgICAgICCQ5pOqg3KDYoNngqqDW4ONDQogIGJramlzLnR4
dCAtLS0tIInzguqCvUpJUyAgICAgICAgIEVTQ4NSgVuDaIKqjIeCr4K9DQogIGJrc2ppcy50
eHQtLS0tIInzguqCvVNoaWZ0X0pJUyAgIJDmk6qDcoNig2eCqoNbg40NCg0KICBjdHJsX3ou
dHh0ICAgICBTaGlmdF9KSVMgICAgICBeWoNMg4ODiYNOg16VdIKrICAgKERPU5WXKQ0KICBt
YWN0eHQuYmluICAgICCDfYNig06Db4NDg2mDiklJg3SDSIFbg32DYoNnDQo=
--------------080407000002030906070309
Content-Type: text/plain;
 name="file_euc_jp.txt"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
 filename="file_euc_jp.txt"

v6ehuaXGpa2luaXIpdWloaWkpeu9uCBWZXIzLjMgKEMpSEFUDQoNCqSzpM6loqG8paulpKXW
pM66x7+3yMekz6SzpLOky6SipOqk3qS5oaMNCmh0dHA6Ly93d3cwMi5zby1uZXQubmUuanAv
JTdFaGF0L2ZpbGVzL2luZGV4LWouaHRtbA0KDQpjciwgY3JsZiwgbGalx6Wjpeylr6XIpeoo
pdWlqaXrpcAppM7G4s3GpM/GsaS4pMekuaSsoaK51KTOtujA2qTqpKykvaTspL6k7A0KQ1Io
TWFjyfcpoaJDUitMRihET1PJ9ymhokxGKFVOSVjJ9ymky6TKpM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jGsaS4DQoNCiAgczAyMDEudHh0IC0t
LS0gSklTIFgwMjAxICAgICAgICAgpPIgU2hpZnRfSklTpMfJ5Lnmsr0gOKXTpcOlyEpJU1gw
MjAxpMjGsaS4DQogIHMwMjA4LnR4dCAtLS0tIEpJUyBYMDIwOCAgICAgICAgIKTyIFNoaWZ0
X0pJU6THyeS55rK9DQoNCmp0ZXh0L290aGVycy8NCg0KICBiNjRqaXMudHh0IC0tLSBJU08t
MjAyMi1KUCAoSklTKSCk8iBiYXNlNjSkx8nkueayvQ0KICBxdGppcy50eHQgLS0tLSBJU08t
MjAyMi1KUCAoSklTKSCk8iBxdW90ZWQtcHJpbnRhYmxlpMfJ5Lnmsr0NCg0KICBia2V1Yy50
eHQgLS0tLSCy9aTspL9FVUMtSlAgICAgICDA6MaspdOlw6XIpKylvKXtDQogIGJramlzLnR4
dCAtLS0tILL1pOykv0pJUyAgICAgICAgIEVTQ6WzobylyaSst+eksaS/DQogIGJrc2ppcy50
eHQtLS0tILL1pOykv1NoaWZ0X0pJUyAgIMDoxqyl06XDpcikrKW8pe0NCg0KICBjdHJsX3ou
dHh0ICAgICBTaGlmdF9KSVMgICAgICBeWqWtpeOl6aWvpb/J1aStICAgKERPU8n3KQ0KICBt
YWN0eHQuYmluICAgICCl3qXDpa+l0KWkpcql6klJpdWlqaG8pd6lw6XIDQo=
--------------080407000002030906070309
Content-Type: text/plain;
 name="_test.c"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="_test.c"

#include <stdio.h>
#include <iconv.h>
#include <errno.h>

char euc_jp[] =
{
0xbf,0xa7,0xa1,0xb9,0xa5,0xc6,0xa5,0xad,0xa5,0xb9,
0xa5,0xc8,0xa5,0xd5,0xa5,0xa1,0xa5,0xa4,0xa5,0xeb,
0xbd,0xb8,0x20,0x56,0x65,0x72,0x33,0x2e,0x33,0x20,
0x28,0x43,0x29,0x48,0x41,0x54,0xd,0xa,0xd,0xa,
0xa4,0xb3,0xa4,0xce,0xa5,0xa2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0xa3,0xd,0xa,0xd,0xa,0xd,0xa,
0x6a,0x74,0x65,0x78,0x74,0x2f,0xd,0xa,0xd,0xa,
0x20,0x20,0x72,0x65,0x61,0x64,0x6d,0x65,0x2e,0x74,
0x78,0x74,0x20,0x2d,0x2d,0x2d,0x20,0xb1,0xd1,0xb8,
0xec,0x52,0x45,0x41,0x44,0x4d,0x45,0x20,0x20,0x20,
0x20,0x20,0x28,0x41,0x53,0x43,0x49,0x49,0x29,0xd,
0xa,0x20,0x20,0x72,0x65,0x61,0x64,0x6d,0x65,0x2e,
0x65,0x75,0x63,0x20,0x2d,0x2d,0x2d,0x20,0xa4,0xb3,
0xa4,0xce,0xa5,0xd5,0xa5,0xa1,0xa5,0xa4,0xa5,0xeb,
0x20,0x20,0x20,0x28,0x45,0x55,0x43,0x2d,0x4a,0x50,
0x29,0xd,0xa,0x20,0x20,0x72,0x65,0x61,0x64,0x6d,
0x65,0x2e,0x6a,0x69,0x73,0x20,0x2d,0x2d,0x2d,0x20,
0xc6,0xfc,0xcb,0xdc,0xb8,0xec,0x52,0x45,0x41,0x44,
0x4d,0x45,0x20,0x20,0x20,0x28,0x4a,0x49,0x53,0x29,
0xd,0xa,0x20,0x20,0x72,0x65,0x61,0x64,0x6d,0x65,
0x2e,0x73,0x6a,0x73,0x20,0x2d,0x2d,0x2d,0x20,0xc6,
0xfc,0xcb,0xdc,0xb8,0xec,0x52,0x45,0x41,0x44,0x4d,
0x45,0x20,0x20,0x20,0x28,0x53,0x68,0x69,0x66,0x74,
0x5f,0x4a,0x49,0x53,0x29,0xd,0xa,0xd,0xa,0x6a,
0x74,0x65,0x78,0x74,0x2f,0x63,0x72,0x2f,0xd,0xa,
0x6a,0x74,0x65,0x78,0x74,0x2f,0x63,0x72,0x6c,0x66,
0x2f,0xd,0xa,0x6a,0x74,0x65,0x78,0x74,0x2f,0x6c,
0x66,0x2f,0xd,0xa,0xd,0xa,0x20,0x20,0x61,0x73,
0x63,0x69,0x69,0x2e,0x74,0x78,0x74,0x20,0x2d,0x2d,
0x2d,0x2d,0x20,0x41,0x53,0x43,0x49,0x49,0xa4,0xc7,
0xbd,0xf1,0xa4,0xa4,0xa4,0xbf,0xc6,0xfc,0xcb,0xdc,
0xb8,0xec,0x28,0xa5,0xed,0xa1,0xbc,0xa5,0xde,0xbb,
0xfa,0x29,0xd,0xa,0xd,0xa,0x20,0x20,0x6a,0x30,
0x32,0x30,0x31,0x2d,0x38,0x62,0x2e,0x74,0x78,0x74,
0x20,0x2d,0x20,0x4a,0x49,0x53,0x20,0x58,0x30,0x32,
0x30,0x31,0xa4,0xce,0xca,0xd2,0xb2,0xbe,0xcc,0xbe,
0x20,0xa4,0xf2,0x20,0x38,0xc3,0xb1,0xb0,0xcc,0xc9,
0xe4,0xb9,0xe6,0xb2,0xbd,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x53,0x68,0x69,0x66,0x74,0x5f,0x4a,0x49,
0x53,0xa4,0xc8,0xc6,0xb1,0xa4,0xb8,0xd,0xa,0x20,
0x20,0x6a,0x30,0x32,0x30,0x31,0x2d,0x65,0x73,0x2e,
0x74,0x78,0x74,0x20,0x2d,0x20,0x4a,0x49,0x53,0x20,
0x58,0x30,0x32,0x30,0x31,0xa4,0xce,0xca,0xd2,0xb2,
0xbe,0xcc,0xbe,0x20,0xa4,0xf2,0x20,0x45,0x53,0x43,
0x28,0x49,0xa4,0xc7,0xc9,0xe4,0xb9,0xe6,0xb2,0xbd,
0xd,0xa,0x20,0x20,0x6a,0x30,0x32,0x30,0x31,0x2d,
0x73,0x6f,0x2e,0x74,0x78,0x74,0x20,0x2d,0x20,0x4a,
0x49,0x53,0x20,0x58,0x30,0x32,0x30,0x31,0xa4,0xce,
0xca,0xd2,0xb2,0xbe,0xcc,0xbe,0x20,0xa4,0xf2,0x20,
0x53,0x4f,0x2f,0x53,0x49,0xa4,0xc7,0xc9,0xe4,0xb9,
0xe6,0xb2,0xbd,0xd,0xa,0xd,0xa,0x20,0x20,0x6a,
0x30,0x32,0x30,0x38,0x2d,0x38,0x62,0x2e,0x74,0x78,
0x74,0x20,0x2d,0x20,0x4a,0x49,0x53,0x20,0x58,0x30,
0x32,0x30,0x38,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0xa4,0xf2,0x20,0x38,0xc3,0xb1,0xb0,0xcc,
0xc9,0xe4,0xb9,0xe6,0xb2,0xbd,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x45,0x55,0x43,0x2d,0x4a,0x50,0xa4,
0xc8,0xc6,0xb1,0xa4,0xb8,0xd,0xa,0x20,0x20,0x6a,
0x30,0x32,0x30,0x38,0x2d,0x37,0x38,0x2e,0x74,0x78,
0x74,0x20,0x2d,0x20,0x4a,0x49,0x53,0x20,0x58,0x30,
0x32,0x30,0x38,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0xa4,0xf2,0x20,0x45,0x53,0x43,0x24,0x40,
0xa4,0xc7,0xc9,0xe4,0xb9,0xe6,0xb2,0xbd,0x20,0x20,
0x20,0x20,0x20,0xa4,0xa4,0xa4,0xef,0xa4,0xe6,0xa4,
0xeb,0xb5,0xec,0x4a,0x49,0x53,0xd,0xa,0x20,0x20,
0x6a,0x30,0x32,0x30,0x38,0x2d,0x38,0x33,0x2e,0x74,
0x78,0x74,0x20,0x2d,0x20,0x4a,0x49,0x53,0x20,0x58,
0x30,0x32,0x30,0x38,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0xa4,0xf2,0x20,0x45,0x53,0x43,0x24,
0x42,0xa4,0xc7,0xc9,0xe4,0xb9,0xe6,0xb2,0xbd,0x20,
0x20,0x20,0x20,0x20,0xa4,0xa4,0xa4,0xef,0xa4,0xe6,
0xa4,0xeb,0xbf,0xb7,0x4a,0x49,0x53,0xd,0xa,0xd,
0xa,0x20,0x20,0x65,0x30,0x32,0x30,0x31,0x2e,0x74,
0x78,0x74,0x20,0x2d,0x2d,0x2d,0x2d,0x20,0x4a,0x49,
0x53,0x20,0x58,0x30,0x32,0x30,0x31,0xa4,0xce,0xca,
0xd2,0xb2,0xbe,0xcc,0xbe,0x20,0xa4,0xf2,0x20,0x45,
0x55,0x43,0x2d,0x4a,0x50,0xa4,0xc7,0xc9,0xe4,0xb9,
0xe6,0xb2,0xbd,0xd,0xa,0x20,0x20,0x65,0x30,0x32,
0x30,0x38,0x2e,0x74,0x78,0x74,0x20,0x2d,0x2d,0x2d,
0x2d,0x20,0x4a,0x49,0x53,0x20,0x58,0x30,0x32,0x30,
0x38,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0xa4,0xf2,0x20,0x45,0x55,0x43,0x2d,0x4a,0x50,0xa4,
0xc7,0xc9,0xe4,0xb9,0xe6,0xb2,0xbd,0x20,0x20,0x20,
0x20,0x38,0xa5,0xd3,0xa5,0xc3,0xa5,0xc8,0x4a,0x49,
0x53,0x58,0x30,0x32,0x30,0x38,0xa4,0xc8,0xc6,0xb1,
0xa4,0xb8,0xd,0xa,0xd,0xa,0x20,0x20,0x73,0x30,
0x32,0x30,0x31,0x2e,0x74,0x78,0x74,0x20,0x2d,0x2d,
0x2d,0x2d,0x20,0x4a,0x49,0x53,0x20,0x58,0x30,0x32,
0x30,0x31,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0xa4,0xf2,0x20,0x53,0x68,0x69,0x66,0x74,0x5f,
0x4a,0x49,0x53,0xa4,0xc7,0xc9,0xe4,0xb9,0xe6,0xb2,
0xbd,0x20,0x38,0xa5,0xd3,0xa5,0xc3,0xa5,0xc8,0x4a,
0x49,0x53,0x58,0x30,0x32,0x30,0x31,0xa4,0xc8,0xc6,
0xb1,0xa4,0xb8,0xd,0xa,0x20,0x20,0x73,0x30,0x32,
0x30,0x38,0x2e,0x74,0x78,0x74,0x20,0x2d,0x2d,0x2d,
0x2d,0x20,0x4a,0x49,0x53,0x20,0x58,0x30,0x32,0x30,
0x38,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0xa4,0xf2,0x20,0x53,0x68,0x69,0x66,0x74,0x5f,0x4a,
0x49,0x53,0xa4,0xc7,0xc9,0xe4,0xb9,0xe6,0xb2,0xbd,
0xd,0xa,0xd,0xa,0x6a,0x74,0x65,0x78,0x74,0x2f,
0x6f,0x74,0x68,0x65,0x72,0x73,0x2f,0xd,0xa,0xd,
0xa,0x20,0x20,0x62,0x36,0x34,0x6a,0x69,0x73,0x2e,
0x74,0x78,0x74,0x20,0x2d,0x2d,0x2d,0x20,0x49,0x53,
0x4f,0x2d,0x32,0x30,0x32,0x32,0x2d,0x4a,0x50,0x20,
0x28,0x4a,0x49,0x53,0x29,0x20,0xa4,0xf2,0x20,0x62,
0x61,0x73,0x65,0x36,0x34,0xa4,0xc7,0xc9,0xe4,0xb9,
0xe6,0xb2,0xbd,0xd,0xa,0x20,0x20,0x71,0x74,0x6a,
0x69,0x73,0x2e,0x74,0x78,0x74,0x20,0x2d,0x2d,0x2d,
0x2d,0x20,0x49,0x53,0x4f,0x2d,0x32,0x30,0x32,0x32,
0x2d,0x4a,0x50,0x20,0x28,0x4a,0x49,0x53,0x29,0x20,
0xa4,0xf2,0x20,0x71,0x75,0x6f,0x74,0x65,0x64,0x2d,
0x70,0x72,0x69,0x6e,0x74,0x61,0x62,0x6c,0x65,0xa4,
0xc7,0xc9,0xe4,0xb9,0xe6,0xb2,0xbd,0xd,0xa,0xd,
0xa,0x20,0x20,0x62,0x6b,0x65,0x75,0x63,0x2e,0x74,
0x78,0x74,0x20,0x2d,0x2d,0x2d,0x2d,0x20,0xb2,0xf5,
0xa4,0xec,0xa4,0xbf,0x45,0x55,0x43,0x2d,0x4a,0x50,
0x20,0x20,0x20,0x20,0x20,0x20,0xc0,0xe8,0xc6,0xac,
0xa5,0xd3,0xa5,0xc3,0xa5,0xc8,0xa4,0xac,0xa5,0xbc,
0xa5,0xed,0xd,0xa,0x20,0x20,0x62,0x6b,0x6a,0x69,
0x73,0x2e,0x74,0x78,0x74,0x20,0x2d,0x2d,0x2d,0x2d,
0x20,0xb2,0xf5,0xa4,0xec,0xa4,0xbf,0x4a,0x49,0x53,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x45,
0x53,0x43,0xa5,0xb3,0xa1,0xbc,0xa5,0xc9,0xa4,0xac,
0xb7,0xe7,0xa4,0xb1,0xa4,0xbf,0xd,0xa,0x20,0x20,
0x62,0x6b,0x73,0x6a,0x69,0x73,0x2e,0x74,0x78,0x74,
0x2d,0x2d,0x2d,0x2d,0x20,0xb2,0xf5,0xa4,0xec,0xa4,
0xbf,0x53,0x68,0x69,0x66,0x74,0x5f,0x4a,0x49,0x53,
0x20,0x20,0x20,0xc0,0xe8,0xc6,0xac,0xa5,0xd3,0xa5,
0xc3,0xa5,0xc8,0xa4,0xac,0xa5,0xbc,0xa5,0xed,0xd,
0xa,0xd,0xa,0x20,0x20,0x63,0x74,0x72,0x6c,0x5f,
0x7a,0x2e,0x74,0x78,0x74,0x20,0x20,0x20,0x20,0x20,
0x53,0x68,0x69,0x66,0x74,0x5f,0x4a,0x49,0x53,0x20,
0x20,0x20,0x20,0x20,0x20,0x5e,0x5a,0xa5,0xad,0xa5,
0xe3,0xa5,0xe9,0xa5,0xaf,0xa5,0xbf,0xc9,0xd5,0xa4,
0xad,0x20,0x20,0x20,0x28,0x44,0x4f,0x53,0xc9,0xf7,
0x29,0xd,0xa,0x20,0x20,0x6d,0x61,0x63,0x74,0x78,
0x74,0x2e,0x62,0x69,0x6e,0x20,0x20,0x20,0x20,0x20,
0xa5,0xde,0xa5,0xc3,0xa5,0xaf,0xa5,0xd0,0xa5,0xa4,
0xa5,0xca,0xa5,0xea,0x49,0x49,0xa5,0xd5,0xa5,0xa9,
0xa1,0xbc,0xa5,0xde,0xa5,0xc3,0xa5,0xc8,0xd,0xa
};

char shift_jis[] = 
{
0x90,0x46,0x81,0x58,0x83,0x65,0x83,0x4c,0x83,0x58,
0x83,0x67,0x83,0x74,0x83,0x40,0x83,0x43,0x83,0x8b,
0x8f,0x57,0x20,0x56,0x65,0x72,0x33,0x2e,0x33,0x20,
0x28,0x43,0x29,0x48,0x41,0x54,0xd,0xa,0xd,0xa,
0x82,0xb1,0x82,0xcc,0x83,0x41,0x81,0x5b,0x83,0x4a,
0x83,0x43,0x83,0x75,0x82,0xcc,0x8d,0xc5,0x90,0x56,
0x94,0xc5,0x82,0xcd,0x82,0xb1,0x82,0xb1,0x82,0xc9,
0x82,0xa0,0x82,0xe8,0x82,0xdc,0x82,0xb7,0x81,0x42,
0xd,0xa,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,
0x77,0x77,0x30,0x32,0x2e,0x73,0x6f,0x2d,0x6e,0x65,
0x74,0x2e,0x6e,0x65,0x2e,0x6a,0x70,0x2f,0x25,0x37,
0x45,0x68,0x61,0x74,0x2f,0x66,0x69,0x6c,0x65,0x73,
0x2f,0x69,0x6e,0x64,0x65,0x78,0x2d,0x6a,0x2e,0x68,
0x74,0x6d,0x6c,0xd,0xa,0xd,0xa,0x63,0x72,0x2c,
0x20,0x63,0x72,0x6c,0x66,0x2c,0x20,0x6c,0x66,0x83,
0x66,0x83,0x42,0x83,0x8c,0x83,0x4e,0x83,0x67,0x83,
0x8a,0x28,0x83,0x74,0x83,0x48,0x83,0x8b,0x83,0x5f,
0x29,0x82,0xcc,0x93,0xe0,0x97,0x65,0x82,0xcd,0x93,
0xaf,0x82,0xb6,0x82,0xc5,0x82,0xb7,0x82,0xaa,0x81,
0x41,0x8d,0x73,0x82,0xcc,0x8b,0xe6,0x90,0xd8,0x82,
0xe8,0x82,0xaa,0x82,0xbb,0x82,0xea,0x82,0xbc,0x82,
0xea,0xd,0xa,0x43,0x52,0x28,0x4d,0x61,0x63,0x95,
0x97,0x29,0x81,0x41,0x43,0x52,0x2b,0x4c,0x46,0x28,
0x44,0x4f,0x53,0x95,0x97,0x29,0x81,0x41,0x4c,0x46,
0x28,0x55,0x4e,0x49,0x58,0x95,0x97,0x29,0x82,0xc9,
0x82,0xc8,0x82,0xc1,0x82,0xc4,0x82,0xa2,0x82,0xdc,
0x82,0xb7,0x81,0x42,0xd,0xa,0xd,0xa,0xd,0xa,
0x6a,0x74,0x65,0x78,0x74,0x2f,0xd,0xa,0xd,0xa,
0x20,0x20,0x72,0x65,0x61,0x64,0x6d,0x65,0x2e,0x74,
0x78,0x74,0x20,0x2d,0x2d,0x2d,0x20,0x89,0x70,0x8c,
0xea,0x52,0x45,0x41,0x44,0x4d,0x45,0x20,0x20,0x20,
0x20,0x20,0x28,0x41,0x53,0x43,0x49,0x49,0x29,0xd,
0xa,0x20,0x20,0x72,0x65,0x61,0x64,0x6d,0x65,0x2e,
0x65,0x75,0x63,0x20,0x2d,0x2d,0x2d,0x20,0x82,0xb1,
0x82,0xcc,0x83,0x74,0x83,0x40,0x83,0x43,0x83,0x8b,
0x20,0x20,0x20,0x28,0x45,0x55,0x43,0x2d,0x4a,0x50,
0x29,0xd,0xa,0x20,0x20,0x72,0x65,0x61,0x64,0x6d,
0x65,0x2e,0x6a,0x69,0x73,0x20,0x2d,0x2d,0x2d,0x20,
0x93,0xfa,0x96,0x7b,0x8c,0xea,0x52,0x45,0x41,0x44,
0x4d,0x45,0x20,0x20,0x20,0x28,0x4a,0x49,0x53,0x29,
0xd,0xa,0x20,0x20,0x72,0x65,0x61,0x64,0x6d,0x65,
0x2e,0x73,0x6a,0x73,0x20,0x2d,0x2d,0x2d,0x20,0x93,
0xfa,0x96,0x7b,0x8c,0xea,0x52,0x45,0x41,0x44,0x4d,
0x45,0x20,0x20,0x20,0x28,0x53,0x68,0x69,0x66,0x74,
0x5f,0x4a,0x49,0x53,0x29,0xd,0xa,0xd,0xa,0x6a,
0x74,0x65,0x78,0x74,0x2f,0x63,0x72,0x2f,0xd,0xa,
0x6a,0x74,0x65,0x78,0x74,0x2f,0x63,0x72,0x6c,0x66,
0x2f,0xd,0xa,0x6a,0x74,0x65,0x78,0x74,0x2f,0x6c,
0x66,0x2f,0xd,0xa,0xd,0xa,0x20,0x20,0x61,0x73,
0x63,0x69,0x69,0x2e,0x74,0x78,0x74,0x20,0x2d,0x2d,
0x2d,0x2d,0x20,0x41,0x53,0x43,0x49,0x49,0x82,0xc5,
0x8f,0x91,0x82,0xa2,0x82,0xbd,0x93,0xfa,0x96,0x7b,
0x8c,0xea,0x28,0x83,0x8d,0x81,0x5b,0x83,0x7d,0x8e,
0x9a,0x29,0xd,0xa,0xd,0xa,0x20,0x20,0x6a,0x30,
0x32,0x30,0x31,0x2d,0x38,0x62,0x2e,0x74,0x78,0x74,
0x20,0x2d,0x20,0x4a,0x49,0x53,0x20,0x58,0x30,0x32,
0x30,0x31,0x82,0xcc,0x95,0xd0,0x89,0xbc,0x96,0xbc,
0x20,0x82,0xf0,0x20,0x38,0x92,0x50,0x88,0xca,0x95,
0x84,0x8d,0x86,0x89,0xbb,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x53,0x68,0x69,0x66,0x74,0x5f,0x4a,0x49,
0x53,0x82,0xc6,0x93,0xaf,0x82,0xb6,0xd,0xa,0x20,
0x20,0x6a,0x30,0x32,0x30,0x31,0x2d,0x65,0x73,0x2e,
0x74,0x78,0x74,0x20,0x2d,0x20,0x4a,0x49,0x53,0x20,
0x58,0x30,0x32,0x30,0x31,0x82,0xcc,0x95,0xd0,0x89,
0xbc,0x96,0xbc,0x20,0x82,0xf0,0x20,0x45,0x53,0x43,
0x28,0x49,0x82,0xc5,0x95,0x84,0x8d,0x86,0x89,0xbb,
0xd,0xa,0x20,0x20,0x6a,0x30,0x32,0x30,0x31,0x2d,
0x73,0x6f,0x2e,0x74,0x78,0x74,0x20,0x2d,0x20,0x4a,
0x49,0x53,0x20,0x58,0x30,0x32,0x30,0x31,0x82,0xcc,
0x95,0xd0,0x89,0xbc,0x96,0xbc,0x20,0x82,0xf0,0x20,
0x53,0x4f,0x2f,0x53,0x49,0x82,0xc5,0x95,0x84,0x8d,
0x86,0x89,0xbb,0xd,0xa,0xd,0xa,0x20,0x20,0x6a,
0x30,0x32,0x30,0x38,0x2d,0x38,0x62,0x2e,0x74,0x78,
0x74,0x20,0x2d,0x20,0x4a,0x49,0x53,0x20,0x58,0x30,
0x32,0x30,0x38,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x82,0xf0,0x20,0x38,0x92,0x50,0x88,0xca,
0x95,0x84,0x8d,0x86,0x89,0xbb,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x45,0x55,0x43,0x2d,0x4a,0x50,0x82,
0xc6,0x93,0xaf,0x82,0xb6,0xd,0xa,0x20,0x20,0x6a,
0x30,0x32,0x30,0x38,0x2d,0x37,0x38,0x2e,0x74,0x78,
0x74,0x20,0x2d,0x20,0x4a,0x49,0x53,0x20,0x58,0x30,
0x32,0x30,0x38,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x82,0xf0,0x20,0x45,0x53,0x43,0x24,0x40,
0x82,0xc5,0x95,0x84,0x8d,0x86,0x89,0xbb,0x20,0x20,
0x20,0x20,0x20,0x82,0xa2,0x82,0xed,0x82,0xe4,0x82,
0xe9,0x8b,0x8c,0x4a,0x49,0x53,0xd,0xa,0x20,0x20,
0x6a,0x30,0x32,0x30,0x38,0x2d,0x38,0x33,0x2e,0x74,
0x78,0x74,0x20,0x2d,0x20,0x4a,0x49,0x53,0x20,0x58,
0x30,0x32,0x30,0x38,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x82,0xf0,0x20,0x45,0x53,0x43,0x24,
0x42,0x82,0xc5,0x95,0x84,0x8d,0x86,0x89,0xbb,0x20,
0x20,0x20,0x20,0x20,0x82,0xa2,0x82,0xed,0x82,0xe4,
0x82,0xe9,0x90,0x56,0x4a,0x49,0x53,0xd,0xa,0xd,
0xa,0x20,0x20,0x65,0x30,0x32,0x30,0x31,0x2e,0x74,
0x78,0x74,0x20,0x2d,0x2d,0x2d,0x2d,0x20,0x4a,0x49,
0x53,0x20,0x58,0x30,0x32,0x30,0x31,0x82,0xcc,0x95,
0xd0,0x89,0xbc,0x96,0xbc,0x20,0x82,0xf0,0x20,0x45,
0x55,0x43,0x2d,0x4a,0x50,0x82,0xc5,0x95,0x84,0x8d,
0x86,0x89,0xbb,0xd,0xa,0x20,0x20,0x65,0x30,0x32,
0x30,0x38,0x2e,0x74,0x78,0x74,0x20,0x2d,0x2d,0x2d,
0x2d,0x20,0x4a,0x49,0x53,0x20,0x58,0x30,0x32,0x30,
0x38,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x82,0xf0,0x20,0x45,0x55,0x43,0x2d,0x4a,0x50,0x82,
0xc5,0x95,0x84,0x8d,0x86,0x89,0xbb,0x20,0x20,0x20,
0x20,0x38,0x83,0x72,0x83,0x62,0x83,0x67,0x4a,0x49,
0x53,0x58,0x30,0x32,0x30,0x38,0x82,0xc6,0x93,0xaf,
0x82,0xb6,0xd,0xa,0xd,0xa,0x20,0x20,0x73,0x30,
0x32,0x30,0x31,0x2e,0x74,0x78,0x74,0x20,0x2d,0x2d,
0x2d,0x2d,0x20,0x4a,0x49,0x53,0x20,0x58,0x30,0x32,
0x30,0x31,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x82,0xf0,0x20,0x53,0x68,0x69,0x66,0x74,0x5f,
0x4a,0x49,0x53,0x82,0xc5,0x95,0x84,0x8d,0x86,0x89,
0xbb,0x20,0x38,0x83,0x72,0x83,0x62,0x83,0x67,0x4a,
0x49,0x53,0x58,0x30,0x32,0x30,0x31,0x82,0xc6,0x93,
0xaf,0x82,0xb6,0xd,0xa,0x20,0x20,0x73,0x30,0x32,
0x30,0x38,0x2e,0x74,0x78,0x74,0x20,0x2d,0x2d,0x2d,
0x2d,0x20,0x4a,0x49,0x53,0x20,0x58,0x30,0x32,0x30,
0x38,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x82,0xf0,0x20,0x53,0x68,0x69,0x66,0x74,0x5f,0x4a,
0x49,0x53,0x82,0xc5,0x95,0x84,0x8d,0x86,0x89,0xbb,
0xd,0xa,0xd,0xa,0x6a,0x74,0x65,0x78,0x74,0x2f,
0x6f,0x74,0x68,0x65,0x72,0x73,0x2f,0xd,0xa,0xd,
0xa,0x20,0x20,0x62,0x36,0x34,0x6a,0x69,0x73,0x2e,
0x74,0x78,0x74,0x20,0x2d,0x2d,0x2d,0x20,0x49,0x53,
0x4f,0x2d,0x32,0x30,0x32,0x32,0x2d,0x4a,0x50,0x20,
0x28,0x4a,0x49,0x53,0x29,0x20,0x82,0xf0,0x20,0x62,
0x61,0x73,0x65,0x36,0x34,0x82,0xc5,0x95,0x84,0x8d,
0x86,0x89,0xbb,0xd,0xa,0x20,0x20,0x71,0x74,0x6a,
0x69,0x73,0x2e,0x74,0x78,0x74,0x20,0x2d,0x2d,0x2d,
0x2d,0x20,0x49,0x53,0x4f,0x2d,0x32,0x30,0x32,0x32,
0x2d,0x4a,0x50,0x20,0x28,0x4a,0x49,0x53,0x29,0x20,
0x82,0xf0,0x20,0x71,0x75,0x6f,0x74,0x65,0x64,0x2d,
0x70,0x72,0x69,0x6e,0x74,0x61,0x62,0x6c,0x65,0x82,
0xc5,0x95,0x84,0x8d,0x86,0x89,0xbb,0xd,0xa,0xd,
0xa,0x20,0x20,0x62,0x6b,0x65,0x75,0x63,0x2e,0x74,
0x78,0x74,0x20,0x2d,0x2d,0x2d,0x2d,0x20,0x89,0xf3,
0x82,0xea,0x82,0xbd,0x45,0x55,0x43,0x2d,0x4a,0x50,
0x20,0x20,0x20,0x20,0x20,0x20,0x90,0xe6,0x93,0xaa,
0x83,0x72,0x83,0x62,0x83,0x67,0x82,0xaa,0x83,0x5b,
0x83,0x8d,0xd,0xa,0x20,0x20,0x62,0x6b,0x6a,0x69,
0x73,0x2e,0x74,0x78,0x74,0x20,0x2d,0x2d,0x2d,0x2d,
0x20,0x89,0xf3,0x82,0xea,0x82,0xbd,0x4a,0x49,0x53,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x45,
0x53,0x43,0x83,0x52,0x81,0x5b,0x83,0x68,0x82,0xaa,
0x8c,0x87,0x82,0xaf,0x82,0xbd,0xd,0xa,0x20,0x20,
0x62,0x6b,0x73,0x6a,0x69,0x73,0x2e,0x74,0x78,0x74,
0x2d,0x2d,0x2d,0x2d,0x20,0x89,0xf3,0x82,0xea,0x82,
0xbd,0x53,0x68,0x69,0x66,0x74,0x5f,0x4a,0x49,0x53,
0x20,0x20,0x20,0x90,0xe6,0x93,0xaa,0x83,0x72,0x83,
0x62,0x83,0x67,0x82,0xaa,0x83,0x5b,0x83,0x8d,0xd,
0xa,0xd,0xa,0x20,0x20,0x63,0x74,0x72,0x6c,0x5f,
0x7a,0x2e,0x74,0x78,0x74,0x20,0x20,0x20,0x20,0x20,
0x53,0x68,0x69,0x66,0x74,0x5f,0x4a,0x49,0x53,0x20,
0x20,0x20,0x20,0x20,0x20,0x5e,0x5a,0x83,0x4c,0x83,
0x83,0x83,0x89,0x83,0x4e,0x83,0x5e,0x95,0x74,0x82,
0xab,0x20,0x20,0x20,0x28,0x44,0x4f,0x53,0x95,0x97,
0x29,0xd,0xa,0x20,0x20,0x6d,0x61,0x63,0x74,0x78,
0x74,0x2e,0x62,0x69,0x6e,0x20,0x20,0x20,0x20,0x20,
0x83,0x7d,0x83,0x62,0x83,0x4e,0x83,0x6f,0x83,0x43,
0x83,0x69,0x83,0x8a,0x49,0x49,0x83,0x74,0x83,0x48,
0x81,0x5b,0x83,0x7d,0x83,0x62,0x83,0x67,0xd,0xa
};

#define OUTBUF_LEN 3000
char ob[OUTBUF_LEN];

int main(int argc, char **argv)
{
    int k;
    iconv_t d;
    size_t n;
    size_t inbytes = sizeof(shift_jis);
    size_t outbytes = OUTBUF_LEN;
    char * inbuf = (char *)shift_jis;
    char * outbuf = (char *)ob;
    
    d = iconv_open("euc-jp", "shift_jis");
    if (d == (iconv_t)-1)
    {
        perror("iconv_open:");
	return -1;
    }
    
    iconv(d, NULL, NULL, (char **)&outbuf, &outbytes);
	    
    n = iconv(d, (char **)&(inbuf), &inbytes, (char **)&outbuf, &outbytes);

    if (n == (size_t)-1)
    {
	perror("iconv:");
        return -1;
    }
	    
    for (k = 0; k < sizeof(euc_jp); k++)
    {
        if (ob[k] != euc_jp[k])
	{
            printf("Error: byte %d is wrong\n", k);
	    printf("outbuf value: %#x, inbuf value %#x, right value: %#x\n",
                    (int)ob[k], (int)(shift_jis[k]), (int)(euc_jp[k]));
            return -1;
	}
    }
    
    iconv_close(d);
    
    return 0;
}

--------------080407000002030906070309--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3F6858C8.3000901>