Sponsored Content
Top Forums Shell Programming and Scripting Characterset conversion problem using iconv command Post 302637095 by sivakumarl on Tuesday 8th of May 2012 10:44:52 AM
Old 05-08-2012
Network Characterset conversion problem using iconv command

Hi Friends,

I am not able to conver character set from UTF-8 to IBM-284 throwing an error "cannot open convertor" . Could you please help me how to get out of this error.

Below command is working fine

Code:
iconv -f ISO8859-15 -t UTF-8 fromfile.txt > tofile.txt

But the below command is not working


Code:
iconv -f UTF-8 -t ibm-284 fromfile.txt > tofile.txt


Please help me friends , i am struggling from last one week.

Thanks
Siva.

Moderator's Comments:
Mod Comment edit by bakunin: another two pairs of my wealth of [code] and [/code]-tags given to charity. Please, prevent me from poverty, bring your own tags to the party

Last edited by bakunin; 05-08-2012 at 11:53 AM..
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Conversion Problem

hi, i am reading a string values from a file.the values are 2000 20000 300 10 5000 now retrieving each value one by one and printing if they are greater than 1000. i use this statement for the same (in perl script) if ($_ gt 1000){ print $_ } but its now prininting all... (3 Replies)
Discussion started by: vivekshankar
3 Replies

2. Shell Programming and Scripting

decimal value for particular characterset

Hi, I need some help to get decimal value of some particluar character set for e.g. in windows-1251 characterset ж --> 230 Please help and suggest way to achive same. (7 Replies)
Discussion started by: peeyushgehlot
7 Replies

3. Shell Programming and Scripting

Help with iconv command

Hi , I am using iconv command to convert a file in UTF-16 format to UTF-8 format. This command will work for few files but for some showing an error as bad input character. But if i copy the contents of the file for which it is showing "bad input character" to a new file and perform the... (0 Replies)
Discussion started by: Shruthi8818
0 Replies

4. UNIX for Dummies Questions & Answers

Help with iconv command

Hi , I am using iconv command to convert a file in UTF-16 format to UTF-8 format. This command will work for few files but for some showing an error as bad input character. But if i copy the contents of the file for which it is showing "bad input character" to a new file and perform the... (2 Replies)
Discussion started by: Shruthi8818
2 Replies

5. AIX

Installing Converter files for iconv conversion

Hi Friends, I need to install two converter packages UTF-8_IBM-284 and UTF-8_IBM-500 in the location /usr/lib/nls/loc/iconv/* or /usr/lib/nls/loc/iconvTable/* . Could you please let me know how to get this converter files. Thanks in Advance, Siva. (1 Reply)
Discussion started by: sivakumarl
1 Replies

6. Shell Programming and Scripting

Help with command iconv

I need to convert a utf16 file to utf8. When i use the iconv command to do so it gives an error saying invalid function. When I ran the iconv -l function it did not list the utf16 and utf8 as part of its internal table. Is there anyway I can add these encodings in the library? Is there any other... (3 Replies)
Discussion started by: gaun
3 Replies

7. Shell Programming and Scripting

File conversion problem

To convert file epcdic to ascill format,i am using below code.Getting some junk characters in output file.not sure what the issue is.Please correct if below command is wrong. DD conv=ascii if=filename of =output_filename. (2 Replies)
Discussion started by: srivalli
2 Replies

8. AIX

Iconv: conversion IBM-852 to UTF8 : which filesets to be installed ?

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... (2 Replies)
Discussion started by: stephnane
2 Replies

9. UNIX for Beginners Questions & Answers

Explain iconv command

I have a requirement to remove all non-ascii characters from a fixed length file. I used the below command which is removing special characters but somehow the total record length is being truncated to one space less. If it is a multi-byte string then many characters at the end are being truncated.... (8 Replies)
Discussion started by: eskay
8 Replies
ICONV_OPEN(3)						     Linux Programmer's Manual						     ICONV_OPEN(3)

NAME
iconv_open - allocate descriptor for character set conversion SYNOPSIS
#include <iconv.h> iconv_t iconv_open(const char *tocode, const char *fromcode); DESCRIPTION
The iconv_open() function allocates a conversion descriptor suitable for converting byte sequences from character encoding fromcode to character encoding tocode. The values permitted for fromcode and tocode and the supported combinations are system-dependent. For the GNU C library, the permitted values are listed by the iconv --list command, and all combinations of the listed values are supported. Furthermore the GNU C library and the GNU libiconv library support the following two suffixes: //TRANSLIT When the string "//TRANSLIT" is appended to tocode, transliteration is activated. This means that when a character cannot be repre- sented in the target character set, it can be approximated through one or several similarly looking characters. //IGNORE When the string "//IGNORE" is appended to tocode, characters that cannot be represented in the target character set will be silently discarded. The resulting conversion descriptor can be used with iconv(3) any number of times. It remains valid until deallocated using iconv_close(3). A conversion descriptor contains a conversion state. After creation using iconv_open(), the state is in the initial state. Using iconv(3) modifies the descriptor's conversion state. (This implies that a conversion descriptor can not be used in multiple threads simultane- ously.) To bring the state back to the initial state, use iconv(3) with NULL as inbuf argument. RETURN VALUE
The iconv_open() function returns a freshly allocated conversion descriptor. In case of error, it sets errno and returns (iconv_t) -1. ERRORS
The following error can occur, among others: EINVAL The conversion from fromcode to tocode is not supported by the implementation. VERSIONS
This function is available in glibc since version 2.1. CONFORMING TO
UNIX98, POSIX.1-2001. SEE ALSO
iconv(1), iconv(3), iconv_close(3) COLOPHON
This page is part of release 3.44 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. GNU
2008-08-11 ICONV_OPEN(3)
All times are GMT -4. The time now is 12:38 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy