LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices


Reply
  Search this Thread
Old 04-20-2018, 07:17 AM   #1
doctorfabiani
LQ Newbie
 
Registered: Apr 2018
Posts: 0

Rep: Reputation: Disabled
Problem with iconv


Hi all, I am new here , I searched the answer to my question a lot before putting it here.
I am trying to convert a special character ( and @) from utf to mainframe before doing an ftp.

Basically I am using :
iconv -f utf-8 -t IBM-273 <filename>
but issue is :
iconv: conversion to `IBM-273' is not supported

Any idea ? Thanks in advance
 
Old 04-20-2018, 08:05 AM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: MA, USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 7,158
Blog Entries: 12

Rep: Reputation: 2641Reputation: 2641Reputation: 2641Reputation: 2641Reputation: 2641Reputation: 2641Reputation: 2641Reputation: 2641Reputation: 2641Reputation: 2641Reputation: 2641
Have you tried "iconv -l" to list all formats recognized by the program. My version supports that format, however the string is different than what you typed. Perhaps you typed it incorrect. Perform "iconv -l | grep 273" to get a briefer list and perhaps see what the string should be.
 
Old 04-20-2018, 09:27 AM   #3
doctorfabiani
LQ Newbie
 
Registered: Apr 2018
Posts: 0

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rtmistler View Post
Have you tried "iconv -l" to list all formats recognized by the program. My version supports that format, however the string is different than what you typed. Perhaps you typed it incorrect. Perform "iconv -l | grep 273" to get a briefer list and perhaps see what the string should be.
Hello rtmisler , thanks for reply.
If I perform the command you suggested the list is empty.
I don't know if may be useful , I am using MAC

Last edited by doctorfabiani; 04-20-2018 at 09:32 AM.
 
Old 04-20-2018, 10:08 AM   #4
rtmistler
Moderator
 
Registered: Mar 2011
Location: MA, USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 7,158
Blog Entries: 12

Rep: Reputation: 2641Reputation: 2641Reputation: 2641Reputation: 2641Reputation: 2641Reputation: 2641Reputation: 2641Reputation: 2641Reputation: 2641Reputation: 2641Reputation: 2641
You can check this list: https://gist.github.com/hakre/4188459

I would do:
Code:
iconv -V
which iconv
To obtain the version and understand where iconv is running from and if it is from Busybox or if you have a true binary version of it.
 
Old 04-20-2018, 12:53 PM   #5
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 9,732
Blog Entries: 7

Rep: Reputation: 2404Reputation: 2404Reputation: 2404Reputation: 2404Reputation: 2404Reputation: 2404Reputation: 2404Reputation: 2404Reputation: 2404Reputation: 2404Reputation: 2404
Quote:
Originally Posted by doctorfabiani View Post
I don't know if may be useful , I am using MAC
that sure sounds like an important detail.
suggest moving thread to non-*nix.
 
Old 04-20-2018, 01:02 PM   #6
rtmistler
Moderator
 
Registered: Mar 2011
Location: MA, USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 7,158
Blog Entries: 12

Rep: Reputation: 2641Reputation: 2641Reputation: 2641Reputation: 2641Reputation: 2641Reputation: 2641Reputation: 2641Reputation: 2641Reputation: 2641Reputation: 2641Reputation: 2641
Quote:
Originally Posted by doctorfabiani View Post
I don't know if may be useful , I am using MAC
Can you update us with what OS you are running?
 
Old 04-20-2018, 01:27 PM   #7
doctorfabiani
LQ Newbie
 
Registered: Apr 2018
Posts: 0

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rtmistler View Post
Can you update us with what OS you are running?
High Sierra , 10.13.3
 
Old 04-23-2018, 08:16 AM   #8
doctorfabiani
LQ Newbie
 
Registered: Apr 2018
Posts: 0

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
that sure sounds like an important detail.
suggest moving thread to non-*nix.
do you mean to move the discussion to another forum section ?
 
Old 04-23-2018, 08:43 AM   #9
rtmistler
Moderator
 
Registered: Mar 2011
Location: MA, USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 7,158
Blog Entries: 12

Rep: Reputation: 2641Reputation: 2641Reputation: 2641Reputation: 2641Reputation: 2641Reputation: 2641Reputation: 2641Reputation: 2641Reputation: 2641Reputation: 2641Reputation: 2641
Quote:
Originally Posted by doctorfabiani View Post
do you mean to move the discussion to another forum section ?
They did and the discussion has already been moved to the Non-Nix/General forum because it seems to be more of an OS-X question versus one directly about Linux.

Perhaps you can do some of the suggested command versions and location of the command suggestions already made, or invoke iconv with a --help option and post the output. I'm not sure if you can get a version of iconv that matches what I have where it will recognize and provide formats that I see available.
 
Old 04-24-2018, 03:44 AM   #10
doctorfabiani
LQ Newbie
 
Registered: Apr 2018
Posts: 0

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rtmistler View Post
They did and the discussion has already been moved to the Non-Nix/General forum because it seems to be more of an OS-X question versus one directly about Linux.

Perhaps you can do some of the suggested command versions and location of the command suggestions already made, or invoke iconv with a --help option and post the output. I'm not sure if you can get a version of iconv that matches what I have where it will recognize and provide formats that I see available.
Ok,great. Following your suggestion , this is iconv -l :

ANSI_X3.4-1968 ANSI_X3.4-1986 ASCII CP367 IBM367 ISO-IR-6 ISO646-US ISO_646.IRV:1991 US US-ASCII CSASCII
UTF-8 UTF8
UTF-8-MAC UTF8-MAC
ISO-10646-UCS-2 UCS-2 CSUNICODE
UCS-2BE UNICODE-1-1 UNICODEBIG CSUNICODE11
UCS-2LE UNICODELITTLE
ISO-10646-UCS-4 UCS-4 CSUCS4
UCS-4BE
UCS-4LE
UTF-16
UTF-16BE
UTF-16LE
UTF-32
UTF-32BE
UTF-32LE
UNICODE-1-1-UTF-7 UTF-7 CSUNICODE11UTF7
UCS-2-INTERNAL
UCS-2-SWAPPED
UCS-4-INTERNAL
UCS-4-SWAPPED
C99
JAVA
CP819 IBM819 ISO-8859-1 ISO-IR-100 ISO8859-1 ISO_8859-1 ISO_8859-1:1987 L1 LATIN1 CSISOLATIN1
ISO-8859-2 ISO-IR-101 ISO8859-2 ISO_8859-2 ISO_8859-2:1987 L2 LATIN2 CSISOLATIN2
ISO-8859-3 ISO-IR-109 ISO8859-3 ISO_8859-3 ISO_8859-3:1988 L3 LATIN3 CSISOLATIN3
ISO-8859-4 ISO-IR-110 ISO8859-4 ISO_8859-4 ISO_8859-4:1988 L4 LATIN4 CSISOLATIN4
CYRILLIC ISO-8859-5 ISO-IR-144 ISO8859-5 ISO_8859-5 ISO_8859-5:1988 CSISOLATINCYRILLIC
ARABIC ASMO-708 ECMA-114 ISO-8859-6 ISO-IR-127 ISO8859-6 ISO_8859-6 ISO_8859-6:1987 CSISOLATINARABIC
ECMA-118 ELOT_928 GREEK GREEK8 ISO-8859-7 ISO-IR-126 ISO8859-7 ISO_8859-7 ISO_8859-7:1987 ISO_8859-7:2003 CSISOLATINGREEK
HEBREW ISO-8859-8 ISO-IR-138 ISO8859-8 ISO_8859-8 ISO_8859-8:1988 CSISOLATINHEBREW
ISO-8859-9 ISO-IR-148 ISO8859-9 ISO_8859-9 ISO_8859-9:1989 L5 LATIN5 CSISOLATIN5
ISO-8859-10 ISO-IR-157 ISO8859-10 ISO_8859-10 ISO_8859-10:1992 L6 LATIN6 CSISOLATIN6
ISO-8859-11 ISO8859-11 ISO_8859-11
ISO-8859-13 ISO-IR-179 ISO8859-13 ISO_8859-13 L7 LATIN7
ISO-8859-14 ISO-CELTIC ISO-IR-199 ISO8859-14 ISO_8859-14 ISO_8859-14:1998 L8 LATIN8
ISO-8859-15 ISO-IR-203 ISO8859-15 ISO_8859-15 ISO_8859-15:1998 LATIN-9
ISO-8859-16 ISO-IR-226 ISO8859-16 ISO_8859-16 ISO_8859-16:2001 L10 LATIN10
KOI8-R CSKOI8R
KOI8-U
KOI8-RU
CP1250 MS-EE WINDOWS-1250
CP1251 MS-CYRL WINDOWS-1251
CP1252 MS-ANSI WINDOWS-1252
CP1253 MS-GREEK WINDOWS-1253
CP1254 MS-TURK WINDOWS-1254
CP1255 MS-HEBR WINDOWS-1255
CP1256 MS-ARAB WINDOWS-1256
CP1257 WINBALTRIM WINDOWS-1257
CP1258 WINDOWS-1258
850 CP850 IBM850 CSPC850MULTILINGUAL
862 CP862 IBM862 CSPC862LATINHEBREW
866 CP866 IBM866 CSIBM866
MAC MACINTOSH MACROMAN CSMACINTOSH
MACCENTRALEUROPE
MACICELAND
MACCROATIAN
MACROMANIA
MACCYRILLIC
MACUKRAINE
MACGREEK
MACTURKISH
MACHEBREW
MACARABIC
MACTHAI
HP-ROMAN8 R8 ROMAN8 CSHPROMAN8
NEXTSTEP
ARMSCII-8
GEORGIAN-ACADEMY
GEORGIAN-PS
KOI8-T
CP154 CYRILLIC-ASIAN PT154 PTCP154 CSPTCP154
MULELAO-1
CP1133 IBM-CP1133
ISO-IR-166 TIS-620 TIS620 TIS620-0 TIS620.2529-1 TIS620.2533-0 TIS620.2533-1
CP874 WINDOWS-874
VISCII VISCII1.1-1 CSVISCII
TCVN TCVN-5712 TCVN5712-1 TCVN5712-1:1993
ISO-IR-14 ISO646-JP JIS_C6220-1969-RO JP CSISO14JISC6220RO
JISX0201-1976 JIS_X0201 X0201 CSHALFWIDTHKATAKANA
ISO-IR-87 JIS0208 JIS_C6226-1983 JIS_X0208 JIS_X0208-1983 JIS_X0208-1990 X0208 CSISO87JISX0208
ISO-IR-159 JIS_X0212 JIS_X0212-1990 JIS_X0212.1990-0 X0212 CSISO159JISX02121990
CN GB_1988-80 ISO-IR-57 ISO646-CN CSISO57GB1988
CHINESE GB_2312-80 ISO-IR-58 CSISO58GB231280
CN-GB-ISOIR165 ISO-IR-165
ISO-IR-149 KOREAN KSC_5601 KS_C_5601-1987 KS_C_5601-1989 CSKSC56011987
EUC-JP EUCJP EXTENDED_UNIX_CODE_PACKED_FORMAT_FOR_JAPANESE CSEUCPKDFMTJAPANESE
MS_KANJI SHIFT-JIS SHIFT_JIS SJIS CSSHIFTJIS
CP932
ISO-2022-JP CSISO2022JP
ISO-2022-JP-1
ISO-2022-JP-2 CSISO2022JP2
CN-GB EUC-CN EUCCN GB2312 CSGB2312
GBK
CP936 MS936 WINDOWS-936
GB18030
ISO-2022-CN CSISO2022CN
ISO-2022-CN-EXT
HZ HZ-GB-2312
EUC-TW EUCTW CSEUCTW
BIG-5 BIG-FIVE BIG5 BIGFIVE CN-BIG5 CSBIG5
CP950
BIG5-HKSCS:1999
BIG5-HKSCS:2001
BIG5-HKSCS BIG5-HKSCS:2004 BIG5HKSCS
EUC-KR EUCKR CSEUCKR
CP949 UHC
CP1361 JOHAB
ISO-2022-KR CSISO2022KR
CP856
CP922
CP943
CP1046
CP1124
CP1129
CP1161 IBM-1161 IBM1161 CSIBM1161
CP1162 IBM-1162 IBM1162 CSIBM1162
CP1163 IBM-1163 IBM1163 CSIBM1163
DEC-KANJI
DEC-HANYU
437 CP437 IBM437 CSPC8CODEPAGE437
CP737
CP775 IBM775 CSPC775BALTIC
852 CP852 IBM852 CSPCP852
CP853
855 CP855 IBM855 CSIBM855
857 CP857 IBM857 CSIBM857
CP858
860 CP860 IBM860 CSIBM860
861 CP-IS CP861 IBM861 CSIBM861
863 CP863 IBM863 CSIBM863
CP864 IBM864 CSIBM864
865 CP865 IBM865 CSIBM865
869 CP-GR CP869 IBM869 CSIBM869
CP1125
EUC-JISX0213
SHIFT_JISX0213
ISO-2022-JP-3
BIG5-2003
ISO-IR-230 TDS565
ATARI ATARIST
RISCOS-LATIN1
 
Old 04-24-2018, 07:30 AM   #11
rtmistler
Moderator
 
Registered: Mar 2011
Location: MA, USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 7,158
Blog Entries: 12

Rep: Reputation: 2641Reputation: 2641Reputation: 2641Reputation: 2641Reputation: 2641Reputation: 2641Reputation: 2641Reputation: 2641Reputation: 2641Reputation: 2641Reputation: 2641
Per the result you noted in post #3, the list when searched for the string "273" yields nothing.

You are looking for conversion to IBM-273. Either there is another IBM format which is close enough or suitable, that is in the list for the iconv you happen to have, or it is not.

My iconv version is 2.23 and is dated 2016.

So if you can't find a suitable substitute IBM format that you can use, perhaps you can download the source for a current iconv, build it and use that.
 
Old 04-25-2018, 02:37 AM   #12
doctorfabiani
LQ Newbie
 
Registered: Apr 2018
Posts: 0

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rtmistler View Post
Per the result you noted in post #3, the list when searched for the string "273" yields nothing.

You are looking for conversion to IBM-273. Either there is another IBM format which is close enough or suitable, that is in the list for the iconv you happen to have, or it is not.

My iconv version is 2.23 and is dated 2016.

So if you can't find a suitable substitute IBM format that you can use, perhaps you can download the source for a current iconv, build it and use that.
Hello rtmistler , hello all, that's the output of iconv --version on my terminal

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.

Seems to me 1.11 , possible ? In that case how to upgrade the version ? any idea ?
Thanks in advance.
 
Old 04-25-2018, 07:38 AM   #13
rtmistler
Moderator
 
Registered: Mar 2011
Location: MA, USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 7,158
Blog Entries: 12

Rep: Reputation: 2641Reputation: 2641Reputation: 2641Reputation: 2641Reputation: 2641Reputation: 2641Reputation: 2641Reputation: 2641Reputation: 2641Reputation: 2641Reputation: 2641
I've already mentioned one way to upgrade the version, which is to download source and build it.

I certainly can see the source for iconv online with a quick web search there were numerous hits.

I do not know how to build from source in OS-X because I don't know what tools they have, likely GNU.

Sorry to say, but this is about as much assistance as I can provide.
 
Old 04-25-2018, 08:37 AM   #14
doctorfabiani
LQ Newbie
 
Registered: Apr 2018
Posts: 0

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rtmistler View Post
I've already mentioned one way to upgrade the version, which is to download source and build it.

I certainly can see the source for iconv online with a quick web search there were numerous hits.

I do not know how to build from source in OS-X because I don't know what tools they have, likely GNU.

Sorry to say, but this is about as much assistance as I can provide.
thanks a lot!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to make iconv to skip incorrect symbols or iconv alternative? x-stream Linux - Software 4 09-26-2011 09:32 PM
Looking for config.iconv Anna Petrovna Programming 3 07-20-2009 09:12 AM
iconv always returns 0 minimol Programming 1 04-16-2009 04:51 PM
Sylpheed / iconv problem dorakyura Linux - Software 1 01-04-2004 02:29 PM
iconv command saravanan1979 Linux - Software 1 07-06-2002 11:55 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > General

All times are GMT -5. The time now is 10:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration