Sponsored Content
Full Discussion: Explain iconv command
Top Forums UNIX for Beginners Questions & Answers Explain iconv command Post 303032459 by Corona688 on Monday 18th of March 2019 04:46:18 PM
Old 03-18-2019
changing utf-8 to non-utf-8 may change the length as utf-8 has variable-length characters.

For that matter, not sure how much sense a 'fixed length' UTF-8 record makes. It can be N bytes and fewer characters.
This User Gave Thanks to Corona688 For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

please explain the command

Hi all , please explain the following command : perl -e 'select(undef,undef,undef,.15)' Thanks and Regards Navatha (2 Replies)
Discussion started by: Navatha
2 Replies

2. UNIX for Dummies Questions & Answers

Can anyone explain what this command is doing?

Specifically what is the purpose of sed? What is f? Why is the 'cp f $phonefile' line needed when the script ‘goes live'? Why might that two commands following sed be commented out at the present time ( i.e., during development)? Thanks in... (2 Replies)
Discussion started by: knp808
2 Replies

3. Shell Programming and Scripting

Please Explain me this command

find . -type f -ctime +3 -exec mv {} /somedirectory/ \; in particular "-ctime v/s -mtime" and "difference between +3 and -3" (5 Replies)
Discussion started by: Rambo
5 Replies

4. 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

5. 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

6. Shell Programming and Scripting

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 iconv -f ISO8859-15 -t UTF-8 fromfile.txt > tofile.txt But the below command is... (2 Replies)
Discussion started by: sivakumarl
2 Replies

7. 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

8. UNIX for Dummies Questions & Answers

Please explain this command?

Hi, I saw this. But I don't know why we need this? ls mydir > foo.txt ## I know what this will do, it will take the results and write to the file called foo.txt ls mydir > foo.txt 2>&1 ## Don't know why we need 2>&1 Thanks. (2 Replies)
Discussion started by: samnyc
2 Replies

9. Shell Programming and Scripting

Can any one explain this sqlplus command?

Hi , i am new to unix i need a small clarification regarding this sqlplus -s $USER_NAME/$PASSWD@$ORA_SID<< EOF >> SQL_CONN_LOG.log In the above command what is the meaning of <<EOF>> Thanks, krishna. (2 Replies)
Discussion started by: rams_krishna
2 Replies

10. Red Hat

Please help to explain the command

su - keibatch -c ""date ; /usr/local/kei/batch/apb/bin/JKEIKYK4140.sh -run "&$C$6&" WSUKE100201"" Not clear about : date ; /usr/local/kei/batch/apb/bin/JKEIKYK4140.sh -run "&$C$6&" WSUKE100201 Please help (2 Replies)
Discussion started by: honda_city
2 Replies
iconv(1)						      General Commands Manual							  iconv(1)

Name
       iconv - international codeset conversion

Syntax
       iconv [-d] -f fromcodeset -t tocodeset [file...]

Description
       The  command  converts the encoding of characters in its input from one codeset to another codeset.  The fromcodeset argument specifies the
       codeset used to encode the data in the input; that is, it specifies the input codeset.  The tocodeset argument  specifies  the  codeset	to
       which  you  want  the input data converted; that is, it specifies the output codeset.  The command performs the conversion by reading rules
       from a conversion table you create.  The command reads its input from standard input or from one or more files named on the  command  line.
       The command writes its output to standard output.

       You define conversion rules in a conversion table. The conversion rules specify how converts a particular character or group of characters,
       which are called tokens.  The conversion table is a text file that contains two lists.  In the left-hand list, you specify each	token  you
       want  to convert.  In the right-hand list, you specify the token you want to create in the output file. For example, if you issued the fol-
       lowing command:
       % iconv -fupper -tlower conversion_file

       This command uses the conversion table located in the file that specifies how to convert from an uppercase codeset to a lowercase  codeset.
       The following shows part of the conversion table:
       #
       # Converts from uppercase to lowercase
       #
       #    Input token 	Output token
       #    -------------	------------------
		 A		     a
		 B		     b
		 C		     c
		 D		     d
		 E		     e
		 F		     f
		 G		     g
		 .
		 .
		 .
		 Z		     z
       #
       # Convert tabs to spaces using octal
       #
		11		  404040
       #
       # Convert the A umlaut to lowercase
       #
		    A			    a

       Each  line  in the conversion table must contain two strings, an input token and an output token.  The tokens must be delimited with spaces
       or tabs.  The backslash character (  ) either causes the command to recognize a character it normally ignores or introduces a three  digit
       octal  constant.   All octal constants in the conversion table must contain three digits.  Lines that begin with a hash symbol (#) are com-
       ments.  The command ignores comment lines and blank lines.

       You name the conversion table file using the name of the input codeset, an underscore, and the name of the output codeset.  For example, if
       your input codeset is ISO646 and your output codeset is ISO8859, you might name the conversion table file

       The  command  searches  for  the conversion table file in the directory specified by the pathname.  If the ${ICONV} environment variable is
       undefined, the command searches the directory.

       The operation of the command is 8-bit transparent.

Options
       -d Deletes any characters that are omitted from the conversion table.  By default, the command sends characters that  are  omitted  to  the
	  output file without modifying them.

       -f Specifies the name of the input codeset.

       -t Specifies the name of the output codeset.

Restrictions
       The  conversion	table file name can contain no more than 255 characters.  You may need to truncate the name of the input codeset or output
       codeset when you name the conversion table file.

Examples
       The following shows an example of using the command:

       This command converts the data in from ISO646 encoding to ISO8859 encoding.  The command reads the conversion table from the file.  If  the
       ${ICONV} environment variable is undefined, the command uses the file. If that file does not exist, the command issues an error message and
       does not convert the data file.	The command writes the results	of any conversion it performs to the file

Files
See Also
       environ(5int)
       Guide to Developing International Software

																	  iconv(1)
All times are GMT -4. The time now is 06:57 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy