Skip Menu |
 

This queue is for tickets about the Encode-HanConvert CPAN distribution.

Report information
The Basics
Id: 7422
Status: new
Priority: 0/
Queue: Encode-HanConvert

People
Owner: Nobody in particular
Requestors: eric.bourgi [...] dowcorning.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.31
Fixed in: (no value)

Attachments


Subject: big5-simp
Download (untitled) / with headers
text/plain 343b
Running Solaris 8 64-bit Installed Perl 5.08 then added modules as required I now need the big5-simp decoding , I installed the required modules but I cannot get the translation working (see my program and the error code at execution time ) One on my collegue has that function working on WIN32 . I cannot get it work on Sun Solaris Thanks.
Download perl_big6.txt
text/plain 3.2k
==> program fails sunray1 - /users/jdrevett >/usr/local/bin/perl big5.simp_unicode.pl jdr.dat Unknown encoding 'big5-simp' at /usr/local/lib/perl5/site_perl/5.8.0/Encode/HanConvert.pm line 58 ==> program list sunray1 - /users/jdrevett >more big5.simp_unicode.pl #!/usr/local/bin/perl # big5.simp_unicode.pl # Name: Encode::HanConvert - Traditional and Chinese mappings $lib = "/usr/local/lib/perl5/site_perl/5.8.0"; push (@INC,$lib); use Encode::HanConvert; ($source) = @ARGV; $target = $source . "_mod"; open (S,$source) or die "couldn't open $source"; open (T,">$target") or die "couldn't open $target"; while (<S>) { $TheRec = $_; if (substr($TheRec,0,20) eq '^COMMENT $$PURORD_NO' or substr($TheRec,0,20) eq '^COMMENT $$SHIPTO_NO' or substr($TheRec,0,26) eq '^COMMENT $$SHIP_TO_INFO$$=') { $TheRec = html_fmt(big5_to_simp($TheRec)); } print T $TheRec; } close (S); close (T), # unlink $source or die "couldn't unlink $source"; --More--(64%)rename ($target,$source) or die "couldn't rename $target as $source"; sub html_fmt { my($rec_in) = (@_); my $rec_out=''; my $l = length($rec_in); $i=0; while ($i < $l) { if (ord(substr($rec_in,$i,1)) < 128) {$rec_out .= substr($rec_in,$i,1)} else {$rec_out .= sprintf("&#%s;",ord(substr($rec_in,$i,1))); } $i ++; } # end parsing string return $rec_out; } # end html_fmt; ==> Output of /usr/local/bin/perl -V Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration: Platform: osname=solaris, osvers=2.8, archname=sun4-solaris uname='sunos solaris 5.8 generic_108528-11 sun4u sparc sunw,ultra-5_10 ' config_args='-Dcc=gcc -B/usr/ccs/bin/' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='gcc -B/usr/ccs/bin/', ccflags ='-fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-O', cppflags='-fno-strict-aliasing' ccversion='', gccversion='3.1', gccosandvers='solaris2.8' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='gcc -B/usr/ccs/bin/', ldflags =' -L/usr/local/lib ' libpth=/usr/local/lib /usr/lib /usr/ccs/lib libs=-lsocket -lnsl -lgdbm -ldl -lm -lc perllibs=-lsocket -lnsl -ldl -lm -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: USE_LARGE_FILES Built under solaris Compiled at Jul 22 2002 02:55:19 @INC: /usr/local/lib/perl5/5.8.0/sun4-solaris /usr/local/lib/perl5/5.8.0 /usr/local/lib/perl5/site_perl/5.8.0/sun4-solaris /usr/local/lib/perl5/site_perl/5.8.0 /usr/local/lib/perl5/site_perl . ==> I have installed following modules Encode-2.01 Encode-HanConvert-0.31


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.