Subject: | Korean hanging CRITICAL |
Text::Iconv hangs while converting from EUC-KR to ISO-2022-KR see
attached file, system summary: perl 5.8.8 libiconv 1.10 Solaris 10 x86
perl -V
Summary of my perl5 (revision 5 version 8 subversion 8) configuration:
Platform:
osname=solaris, osvers=2.10, archname=i86pc-solaris-thread-multi
uname='sunos dui2 5.10 generic_118855-15 i86pc i386 i86pc '
config_args='-des -Dcc=/usr/local/bin/gcc -Dusethreads'
hint=recommended, useposix=true, d_sigaction=define
usethreads=define use5005threads=undef useithreads=define
usemultiplicity=define
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='/usr/local/bin/gcc', ccflags ='-D_REENTRANT -fno-strict-
aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -
D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPERL_USE_SAFE_PUTENV',
optimize='-O',
cppflags='-D_REENTRANT -fno-strict-aliasing -pipe -Wdeclaration-
after-statement -I/usr/local/include'
ccversion='', gccversion='3.4.6', gccosandvers='solaris2.10'
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
alignbytes=4, prototype=define
Linker and Libraries:
ld='/usr/local/bin/gcc', ldflags =' -L/usr/local/lib '
libpth=/usr/local/lib /usr/lib /usr/ccs/lib
libs=-lsocket -lnsl -lgdbm -ldl -lm -lpthread -lc
perllibs=-lsocket -lnsl -ldl -lm -lpthread -lc
libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
cccdlflags='-fPIC', lddlflags='-G -L/usr/local/lib'
Characteristics of this binary (from libperl):
Compile-time options: MULTIPLICITY PERL_IMPLICIT_CONTEXT
PERL_MALLOC_WRAP PERL_USE_SAFE_PUTENV
USE_ITHREADS USE_LARGE_FILES USE_PERLIO
USE_REENTRANT_API
Built under solaris
Compiled at Dec 29 2006 12:00:29
@INC:
/usr/local/lib/perl5/5.8.8/i86pc-solaris-thread-multi
/usr/local/lib/perl5/5.8.8
/usr/local/lib/perl5/site_perl/5.8.8/i86pc-solaris-thread-multi
/usr/local/lib/perl5/site_perl/5.8.8
/usr/local/lib/perl5/site_perl
.
/usr/local/bin/iconv --version
iconv (GNU libiconv 1.11)
Copyright (C) 2000-2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
Written by Bruno Haible.
uname -a
SunOS xxxx 5.10 Generic_118855-15 i86pc i386 i86pc
Subject: | iconv_t.pl |
use strict;
use Text::Iconv ();
use FileHandle ();
my $euc_kr = 'aldo ¾È³çÇϽÊ';
my $iso_2022_kr = 'aldo $)C>H3gGO=J';
sub text_iconv_t {
my ( $data ) = @_;
my $iconv = Text::Iconv->new( 'EUC-KR', 'ISO-2022-KR' );
return $iconv->convert( $data );
}
sub iconv_t {
my ( $data ) = @_;
my $file_in = "euc_kr.$$.txt";
my $in_fh = FileHandle->new( $file_in, 'w' );
$in_fh->print( $data );
$in_fh->close();
my $result = `/usr/local/bin/iconv -f EUC-KR -t ISO-2022-KR $file_in`;
unlink( $file_in );
return $result;
}
print 'Iconv ', ( iconv_t( $euc_kr ) eq $iso_2022_kr ) ? 'OK' : 'NOT OK', "\n";
print 'Text::Iconv ', ( text_iconv_t( $euc_kr ) eq $iso_2022_kr ) ? 'OK' : 'NOT OK', "\n";