Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

[Solved]iconv : conversion IBM-852 to UTF8 : which filesets to be installed ? 1

Status
Not open for further replies.

stephnane0

IS-IT--Management
Jun 30, 2011
13
FR
Hello.

We have to make conversion from ibm-852 to UTF-8 (using iconv).
We already installed bos.iconv.iso2, but I suppose another fileset is missing :

# echo toto | iconv -f UTF-8 -t IBM-852
iconv: 0791-004 cannot open converter


I know I can make this conversion from IBM-852 to UTF-8 by convert it firstly into a third temporary codeset (IBM8859-2 for example), but I'm looking for a quicker way to do it.

Thank you very much.
 
try this finding:

# echo toto | truss iconv -f UTF-8 -t IBM-852 2>&1|grep Err
kopen("/usr/lib/nls/loc/iconvTable/UTF-8_IBM-852", O_RDONLY) Err#2 ENOENT
statx("/usr/lib/nls/loc/uconvTable/IBM-852", 0x2FF216F0, 76, 0) Err#2 ENOENT
statx("/usr/lib/nls/loc/uconvTable/IBM-852", 0x2FF216F0, 76, 0) Err#2 ENOENT
statx("/etc/nls/loc/uconvTable/IBM-852", 0x2FF216F0, 76, 0) Err#2 ENOENT
kopen("/usr/lib/nls/loc/iconvTable/UTF-8_IBM-852", O_RDONLY) Err#2 ENOENT
statx("/usr/lib/nls/loc/uconvTable/IBM-852", 0x2FF216F0, 76, 0) Err#2 ENOENT
statx("/usr/lib/nls/loc/uconvTable/IBM-852", 0x2FF216F0, 76, 0) Err#2 ENOENT
statx("/etc/nls/loc/uconvTable/IBM-852", 0x2FF216F0, 76, 0) Err#2 ENOENT
kopen("/etc/nls/loc/iconvTable/UTF-8_IBM-852", O_RDONLY) Err#2 ENOENT
kopen("/usr/lib/nls/loc/iconvTable/UTF-8_IBM-852", O_RDONLY) Err#2 ENOENT
statx("/usr/lib/nls/loc/uconvTable/IBM-852", 0x2FF216F0, 76, 0) Err#2 ENOENT
statx("/usr/lib/nls/loc/uconvTable/IBM-852", 0x2FF216F0, 76, 0) Err#2 ENOENT
statx("/etc/nls/loc/uconvTable/IBM-852", 0x2FF216F0, 76, 0) Err#2 ENOENT
kopen("/usr/lib/nls/loc/iconvTable/UTF-8_IBM-852", O_RDONLY) Err#2 ENOENT
statx("/usr/lib/nls/loc/uconvTable/IBM-852", 0x2FF216F0, 76, 0) Err#2 ENOENT
statx("/usr/lib/nls/loc/uconvTable/IBM-852", 0x2FF216F0, 76, 0) Err#2 ENOENT
statx("/etc/nls/loc/uconvTable/IBM-852", 0x2FF216F0, 76, 0) Err#2 ENOENT
kopen("/etc/nls/loc/iconvTable/UTF-8_IBM-852", O_RDONLY) Err#2 ENOENT
kioctl(3, 22528, 0x00000000, 0x00000000) Err#25 ENOTTY
kioctl(3, 22528, 0x00000000, 0x00000000) Err#25 ENOTTY

do you have installed bos.iconv.ucs.pc?

in bos.iconv.* there are such:


The number of archived files is 6008 ./usr/lib/nls/loc/uconvTable/IBM-852
288 ./usr/lib/nls/loc/iconvTable/IBM-852_ISO8859-2
288 ./usr/lib/nls/loc/iconvTable/ISO8859-2_IBM-852

 

btw. on a system 7.1 where I haven;t installed this file set i get error as you:

# ls -al /usr/lib/nls/loc/uconvTable/IBM-852
ls: 0653-341 The file /usr/lib/nls/loc/uconvTable/IBM-852 does not exist.
# echo toto | iconv -f UTF-8 -t IBM-852
iconv: 0791-004 cannot open converter


but on some older AIX 5.3 where I have it command runs with no error:

$ ls -ld /usr/lib/nls/loc/uconvTable/IBM-852
-rw-r--r-- 1 bin bin 6008 Apr 02 2009 /usr/lib/nls/loc/uconvTable/IBM-852
$ echo toto | iconv -f UTF-8 -t IBM-852
toto

 
Hi.

The below filesets are installed :
bos.iconv.com 5.3.0.50 COMMITTED Common Language to Language
bos.iconv.es_ES 5.3.0.0 COMMITTED EBCDIC & ASCII Language
bos.iconv.fr_FR 5.3.0.0 COMMITTED EBCDIC & ASCII Language
bos.iconv.iso2 5.3.0.0 COMMITTED EBCDIC & ASCII Language
bos.iconv.ucs.com 5.3.0.50 COMMITTED Unicode Base Converters for


How can I be sure that bos.iconv.ucs.pc contains the rights iconv/uconv files ?
 

it looks like you have this one missing:

$ lslpp -f bos.iconv.ucs.pc|grep IBM-852
/usr/lib/nls/loc/uconvTable/IBM-852
/usr/lib/nls/loc/iconv/UCS-2_IBM-852 -> /usr/lib/nls/loc/uconv/UCSTBL
/usr/lib/nls/loc/uconv/IBM-852__64 -> /usr/lib/nls/loc/uconv/UCSTBL__64
/usr/lib/nls/loc/iconv/UCS-2_IBM-852__64 -> /usr/lib/nls/loc/uconv/UCSTBL__64
/usr/lib/nls/loc/uconvTable/IBM852 -> /usr/lib/nls/loc/uconvTable/IBM-852
/usr/lib/nls/loc/iconv/IBM-852_UCS-2 -> /usr/lib/nls/loc/uconv/UCSTBL
/usr/lib/nls/loc/uconv/IBM-852 -> /usr/lib/nls/loc/uconv/UCSTBL
/usr/lib/nls/loc/iconv/IBM-852_UCS-2__64 -> /usr/lib/nls/loc/uconv/UCSTBL__64

$ lslpp -l|grep bos.iconv.ucs.
bos.iconv.ucs.ZH_CN 5.3.11.0 COMMITTED Unicode Converters for
bos.iconv.ucs.Zh_CN 5.3.11.0 COMMITTED Unicode Converters for
bos.iconv.ucs.baltic 5.3.11.0 COMMITTED Unicode Converters for Baltic
bos.iconv.ucs.com 5.3.11.0 COMMITTED Unicode Base Converters for
bos.iconv.ucs.ebcdic 5.3.11.0 COMMITTED Unicode Converters for EBCDIC
bos.iconv.ucs.pc 5.3.11.0 COMMITTED Unicode Converters for
 
I dont see any reference to "UTF-8_IBM-852" in your "$ lslpp -l|grep bos.iconv.ucs." command result. I'm not sure this is files I need.
 
but despite of that I get no such error you get (with that extra fileset I have installed on my system)
 
Hello.

Do you have any file which refer to "UTF-8_IBM-852" in /usr/lib/nls/loc/uconvTable or /usr/lib/nls/loc/iconv or /usr/lib/nls/loc/uconv ?
 
here is what I have

Code:
$ find /usr/lib/nls -name "*IBM-852*" -ls
46731    1 lrwxrwxrwx  1 bin       bin             29 Apr 13  2011 /usr/lib/nls/loc/iconv/IBM-852_UCS-2 -> /usr/lib/nls/loc/uconv/UCSTBL
46732    1 lrwxrwxrwx  1 bin       bin             33 Apr 13  2011 /usr/lib/nls/loc/iconv/IBM-852_UCS-2__64 -> /usr/lib/nls/loc/uconv/UCSTBL__64
46697    1 lrwxrwxrwx  1 bin       bin             29 Apr 13  2011 /usr/lib/nls/loc/iconv/UCS-2_IBM-852 -> /usr/lib/nls/loc/uconv/UCSTBL
46698    1 lrwxrwxrwx  1 bin       bin             33 Apr 13  2011 /usr/lib/nls/loc/iconv/UCS-2_IBM-852__64 -> /usr/lib/nls/loc/uconv/UCSTBL__64
46598    1 -rw-r--r--  1 bin       bin            288 Jun 21  2004 /usr/lib/nls/loc/iconvTable/IBM-852_ISO8859-2
46600    1 -rw-r--r--  1 bin       bin            288 Jun 21  2004 /usr/lib/nls/loc/iconvTable/ISO8859-2_IBM-852
46663    1 lrwxrwxrwx  1 bin       bin             29 Apr 13  2011 /usr/lib/nls/loc/uconv/IBM-852 -> /usr/lib/nls/loc/uconv/UCSTBL
46664    1 lrwxrwxrwx  1 bin       bin             33 Apr 13  2011 /usr/lib/nls/loc/uconv/IBM-852__64 -> /usr/lib/nls/loc/uconv/UCSTBL__64
46572    6 -rw-r--r--  1 bin       bin           6008 Apr  2  2009 /usr/lib/nls/loc/uconvTable/IBM-852
$ find /usr/lib/nls -name "*IBM-852*" -exec lslpp -w {} \;
  File                                        Fileset               Type
  ----------------------------------------------------------------------------
  /usr/lib/nls/loc/iconv/IBM-852_UCS-2        bos.iconv.ucs.pc      Symlink
  File                                        Fileset               Type
  ----------------------------------------------------------------------------
  /usr/lib/nls/loc/iconv/IBM-852_UCS-2__64    bos.iconv.ucs.pc      Symlink
  File                                        Fileset               Type
  ----------------------------------------------------------------------------
  /usr/lib/nls/loc/iconv/UCS-2_IBM-852        bos.iconv.ucs.pc      Symlink
  File                                        Fileset               Type
  ----------------------------------------------------------------------------
  /usr/lib/nls/loc/iconv/UCS-2_IBM-852__64    bos.iconv.ucs.pc      Symlink
  File                                        Fileset               Type
  ----------------------------------------------------------------------------
  /usr/lib/nls/loc/iconvTable/IBM-852_ISO8859-2
                                              bos.iconv.iso2        File
  File                                        Fileset               Type
  ----------------------------------------------------------------------------
  /usr/lib/nls/loc/iconvTable/ISO8859-2_IBM-852
                                              bos.iconv.iso2        File
  File                                        Fileset               Type
  ----------------------------------------------------------------------------
  /usr/lib/nls/loc/uconv/IBM-852              bos.iconv.ucs.pc      Symlink
  File                                        Fileset               Type
  ----------------------------------------------------------------------------
  /usr/lib/nls/loc/uconv/IBM-852__64          bos.iconv.ucs.pc      Symlink
  File                                        Fileset               Type
  ----------------------------------------------------------------------------
  /usr/lib/nls/loc/uconvTable/IBM-852         bos.iconv.ucs.pc      File
$

just wondering your command exit with 0 with above files:

$ echo toto | iconv -f UTF-8 -t IBM-852
toto
$ echo $?
0
$

 
Can you launch the command lslpp -l | grep bos.iconv on the system where it works please ?
I just want to have a list of probable filesets because I dont understand how you conclude that it's in the bos.iconv.ucs.pc and not in another one.

Thank you for your help :)
 
hello, here it is;

$ lslpp -l | grep bos.iconv
bos.iconv.Vi_VN 5.3.0.0 COMMITTED ASCII Language Converters -
bos.iconv.Zh_TW 5.3.0.0 COMMITTED EBCDIC & ASCII Language
bos.iconv.ar_AA 5.3.0.0 COMMITTED EBCDIC & ASCII Language
bos.iconv.com 5.3.11.1 COMMITTED Common Language to Language
bos.iconv.da_DK 5.3.0.0 COMMITTED EBCDIC & ASCII Language
bos.iconv.de_DE 5.3.0.0 COMMITTED EBCDIC & ASCII Language
bos.iconv.el_GR 5.3.0.0 COMMITTED EBCDIC & ASCII Language
bos.iconv.en_GB 5.3.0.0 COMMITTED EBCDIC & ASCII Language
bos.iconv.es_ES 5.3.0.0 COMMITTED EBCDIC & ASCII Language
bos.iconv.fr_FR 5.3.0.0 COMMITTED EBCDIC & ASCII Language
bos.iconv.is_IS 5.3.0.0 COMMITTED EBCDIC & ASCII Language
bos.iconv.iso2 5.3.0.0 COMMITTED EBCDIC & ASCII Language
bos.iconv.iso5 5.3.0.0 COMMITTED EBCDIC & ASCII Language
bos.iconv.it_IT 5.3.0.0 COMMITTED EBCDIC & ASCII Language
bos.iconv.iw_IL 5.3.0.0 COMMITTED EBCDIC & ASCII Language
bos.iconv.ja_JP 5.3.0.10 COMMITTED EBCDIC & ASCII Language
bos.iconv.ko_KR 5.3.11.0 COMMITTED EBCDIC & ASCII Language
bos.iconv.tr_TR 5.3.0.0 COMMITTED EBCDIC & ASCII Language
bos.iconv.ucs.ZH_CN 5.3.11.0 COMMITTED Unicode Converters for
bos.iconv.ucs.Zh_CN 5.3.11.0 COMMITTED Unicode Converters for
bos.iconv.ucs.baltic 5.3.11.0 COMMITTED Unicode Converters for Baltic
bos.iconv.ucs.com 5.3.11.0 COMMITTED Unicode Base Converters for
bos.iconv.ucs.ebcdic 5.3.11.0 COMMITTED Unicode Converters for EBCDIC
bos.iconv.ucs.pc 5.3.11.0 COMMITTED Unicode Converters for
bos.iconv.zh_CN 5.3.0.0 COMMITTED EBCDIC & ASCII Language
bos.iconv.zh_TW 5.3.0.0 COMMITTED EBCDIC & ASCII Language
$
 
Thank you, the installation of this fileset solved my problem !
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top