Sponsored Content
Top Forums Shell Programming and Scripting Converting Unicode file to UTF8 format Post 302340176 by vfrg on Monday 3rd of August 2009 02:29:46 AM
Old 08-03-2009
Hi fpmurphy,

I got the following

$iconv -l
ASCII-GR
CNS11643.1986-1
CNS11643.1986-2
GB18030
GBK
IBM-1046
IBM-1124
IBM-1129
IBM-1251
IBM-1252
IBM-1390
IBM-1394
IBM-1399
IBM-850
IBM-856
IBM-921
IBM-922
IBM-932
IBM-943
IBM-eucCN
IBM-eucJP
IBM-eucKR
IBM-eucTW
IBM-sbdTW
IBM-udcJP
IBM-udcTW
ISCII.1991
ISO8859-1
ISO8859-1-GL
ISO8859-1-GR
ISO8859-15
ISO8859-15-GL
ISO8859-15-GR
ISO8859-2
ISO8859-2-GL
ISO8859-2-GR
ISO8859-3
ISO8859-3-GL
ISO8859-3-GR
ISO8859-4
ISO8859-4-GL
ISO8859-4-GR
ISO8859-5
ISO8859-5-GL
ISO8859-5-GR
ISO8859-6
ISO8859-6-GL
ISO8859-6-GR
ISO8859-7
ISO8859-7-GL
ISO8859-7-GR
ISO8859-8
ISO8859-8-GL
ISO8859-8-GR
ISO8859-9
ISO8859-9-GL
ISO8859-9-GR
JISX0201.1976-0
JISX0208.1983-0
KSC5601.1987-0
TIS-620
UCS-2
UNICODE-2
UTF-16
UTF-16le
UTF-32
UTF-8
big5
ct
fold7
fold8
uucode
$

Thanks.
Venkat
This User Gave Thanks to vfrg For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Converting the File Creation Date to a new format

I need to capture a file's creation/modification date and time and convert this to a different format, whilst I can easily get the existing format from a ls -l | awk ' { print $......}' or a cut command I do not know how to convert it to a desired format? I should add that at present the ls -l... (1 Reply)
Discussion started by: barney_clough
1 Replies

2. Shell Programming and Scripting

converting string to unicode

How can I can convert a string in a shell script that looks something like: ]] to unicode equivalent? thanks a lot, webtekie (1 Reply)
Discussion started by: webtekie
1 Replies

3. UNIX for Advanced & Expert Users

Convert UTF8 Format file to ANSI format

:) Hi i am trying to convert a file which is in UTF8 format to ANSI format i tried to use the function ICONV but it is throwing error Function i used it as $ iconv -f UTF8 -t ANSI filename Error iam getting is NOT Supported UTF8 to ANSI please some help me out on this.........Let me... (1 Reply)
Discussion started by: rajreddy
1 Replies

4. UNIX for Dummies Questions & Answers

Convert UTF8 Format file to ANSI format

:confused: Hi i am trying to convert a file which is in UTF8 format to ANSI format i tried to use the function ICONV but it is throwing error Function i used it as $ iconv -f UTF8 -t ANSI filename Error iam getting is NOT Supported UTF8 to ANSI please some help me out on... (9 Replies)
Discussion started by: rajreddy
9 Replies

5. Shell Programming and Scripting

converting config file to csv format

Hello, For 2 days now i've been searching for a solution to this. I am now beginning to doubt this is even possible. It's even harder when you don't know how to search for it. (which keywords generate enough relevancy etc..) I need to parse a config file to generate a CSV file in return. It... (7 Replies)
Discussion started by: zer0dvide
7 Replies

6. Shell Programming and Scripting

Converting file format

My input file is Pipe delimited with 10 fields, I am trying to create a tab delimited output file with 6 fields from the provided input file. Below is sample data Input file abc||2|PIN|num||||www.123.com|abc@123.com| bcd||2|PIN|num|||||abc@123.com|... (3 Replies)
Discussion started by: pasupuleti81
3 Replies

7. Shell Programming and Scripting

Converting windows format file to unix format using script

Hi, I am having couple of files which i used to copy from windows to Linux, so now in case of text files (CTRL^M) appears at end of line. I know i can convert this windows format file to unix format file by running dos2unix. My requirement here is that i want to do it automatically using a... (5 Replies)
Discussion started by: sarbjit
5 Replies

8. Shell Programming and Scripting

Help with Converting UTF-8 data to Unicode

How can I get an error when converting 3rd line, since it has invalid characters abcde a®cdée a�cd� Unicode for ® = ® é = é I used "iconv -f UTF-8 -t ISO-8859-15 in.txt > out.txt" (2 Replies)
Discussion started by: arunbs
2 Replies

9. Shell Programming and Scripting

Need help in converting the file format

Hi All, I need help in converting the mentioned file format into desired output format using awk. Could anyone help me in this? Below is the input.. Date Account Campaign AdGroup Keyword Conversion Revenue Var1 Var2 Var3 Var4 Var5 10 20 30 ... (8 Replies)
Discussion started by: Ravi S M
8 Replies

10. UNIX for Dummies Questions & Answers

help required in converting a file format

My file format: -------------------------------------------------- Complete Consistency Check Valid Area : VALID:VALID Started by : esanwad Started at : Thu Dec 11 16:04:46 2014 CNA version : R21H04_EC08 Check range : AREA VALID/VALID ... (4 Replies)
Discussion started by: Gautam Banerjee
4 Replies
code_page(5)							File Formats Manual						      code_page(5)

NAME
code_page, cp437, cp737, cp775, cp850, cp852, cp855, cp857, cp860, cp861, cp862, cp863, cp865, cp866, cp869, cp874, cp932, cp936, cp949, cp950, cp1250, cp1251, cp1252, cp1253, cp1254, cp1255, cp1256, cp1257, cp1258, dingbats, symbol - Coded character sets that are used on Mi- crosoft Windows and NT systems DESCRIPTION
Code pages are coded character sets that are used on Microsoft Windows, Windows 95, and NT systems. Just as there are different UNIX code- sets, there are different PC code pages, each supporting a particular set of character encodings. A Tru64 UNIX system supplies one locale, en_US.cp850, that directly supports a PC code-page format (MS-DOS Latin 1). For all other locales, data in code-page format is supported only through codeset converters. These converters can be run directly by users or by software or applications that exchange data between PC and Tru64 UNIX systems. Fonts and other kinds of character support are available only for the native UNIX codeset to which a code page can be converted. See the i18n_intro(5) reference page for introductory information on locales and codesets. See the iconv_intro(5) reference page for an introduction to codeset conversion and the name format and location of codeset con- verters. The following table lists and describes the code pages that have conversion support on a Tru64 UNIX system. An asterisk (*) follows the names of code pages that include support for the Euro currency sign (C=). ------------------------------------------------------ Code Page Description ------------------------------------------------------ cp437 MS-DOS United States cp737 Greek cp775 Baltic languages (1) cp850 MS-DOS Multilingual (Latin-1) cp852 MS-DOS Slavic (Latin-2) cp855 IBM Cyrillic cp857 IBM Turkish cp860 MS-DOS Portuguese cp861 MS-DOS Icelandic cp862 Hebrew cp863 MS-DOS Canadian French cp865 MS-DOS Nordic languages cp866 MS-DOS Russian cp869 IBM Modern Greek cp874 * MS-DOS Thai cp932 Japanese cp936 Chinese (People's Republic of China) cp949 Korean cp950 Chinese (Hong Kong) cp1250 * Windows Latin-2 cp1251 * Windows Cyrillic cp1252 * Windows Latin-1 cp1253 * Windows Greek cp1254 * Windows Turkish cp1255 * Windows Hebrew cp1256 * Windows Arabic cp1257 * Windows Baltic (1) cp1258 * Windows Vietnamese dingbats Microsoft dingbat characters symbol Microsoft miscellaneous symbol characters ------------------------------------------------------ (1) Baltic languages include Estonian, Latvian, and Lithuanian. (2) Latin-2 languages include Albanian, Croatian, Czech, Faeroese, Hungarian, Polish, Romanian, Latin Serbian, Slovak, and Slovenian. (3) Cyrillic languages include Byelorussian, Bulgarian, and Russian. In all cases, a code page can be converted to and from the UCS-2, UCS-4, and UTF-8 codesets. In addition, some code pages can be converted directly to ISO codesets as shown in the following table, although some data loss may occur. ------------------------------------------ Code Page Can Be Converted Directly to: ------------------------------------------ cp437 ISO8859-1 cp737 ISO8859-7 cp775 ISO8859-4 cp850 ISO8859-1 cp852 ISO8859-2 cp855 ISO8859-5 cp857 ISO8859-9 cp860 ISO8859-1 cp861 ISO8859-1 cp862 ISO8859-8 cp863 ISO8859-1 cp865 ISO8859-1 cp866 ISO8859-5 cp869 ISO8859-7 cp874 TACTIS cp1252 ISO8859-1, ISO8859-15 ------------------------------------------ See Unicode(5) for information about UCS-2, UCS-4, and UTF-8. Reference pages for UNIX implementations of the ISO codesets have the name format iso8859-number(5). For Traditional Chinese and Japanese, there are no codeset converters whose names include the name of a code page because identical charac- ter encoding is provided in existing UNIX codesets. For Traditional Chinese, character encoding in PC code-page format (cp950) is identical to that in the Big-5 (big5) codeset. For Japanese, character encoding in PC code-page format (cp932) is identical to that in the Shift JIS (SJIS) codeset. Therefore, the codeset converters whose names include big5 and SJIS can be used to convert data in and out of PC code-page format for the supported languages. Caution for Conversion of Korean and Simplified Chinese Conversion of text that starts out in code-page format (cp949) to the DEC Korean (deckorean) codeset may result in loss of data. All of the Tru64 UNIX codeset equivalents for cp949 support all the Hanja and miscellaneous characters also supported by the code page. However, only the UCS-2, UCS-4, and UTF-8 codesets support the complete set of Hangul characters supported by the cp949 code page. The deckorean codeset supports only a subset of these Hangul characters. Therefore, if data is converted from cp949 format to UCS-2, UCS-4, or UTF-8, no data is lost. However, if the data is then converted from UCS-2, UCS-4, or UTF-8 to deckorean, the unsupported Hangul characters will be lost. The DEC Hanzi (dechanzi) codeset uses the same encoding format as the PC code page used for Simplified Chinese (cp936) but does not support all the characters supported by the code page. Therefore, you can use converters with dechanzi in the converter name to convert text to and from cp936 format, but the operation may result in some loss of data. SEE ALSO
Commands: iconv(1) Functions: iconv(3), iconv_close(3), iconv_open(3) Others: i18n_intro(5), iconv_intro(5), iso8859-1(5), iso8859-2(5), iso8859-4(5), iso8859-5(5), iso8859-7(5), iso8859-8(5), iso8859-15(5), Unicode(5) code_page(5)
All times are GMT -4. The time now is 05:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy