Sponsored Content
Top Forums Shell Programming and Scripting Converting Unicode file to UTF8 format Post 302339588 by vfrg on Friday 31st of July 2009 02:35:34 AM
Old 07-31-2009
Converting Unicode file to UTF8 format

Hi,

I have a file in my desktop which is a unicode format. After this file is transferred to Unix using FTP, we are seeing some special character (like rectangle box type) at the first line. The same file is saved as UTF8 (using textpad tool, selecting encode to UTF-8 option) on my desktopand and then FTP to Unix. We could see proper data content.

I tried using the following command in Unix server (We use IBM AIX), but i got error message "Converter can not open"
iconv -f <iso89> -t <utf8> oldfile > newfile

Could you please let us know how we can automatically convert the file to UTF-8 in Unix server itself.

Thanks in advance for any help.

Thanks,
Venkat
 

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
IDNA::Punycode(3pm)					User Contributed Perl Documentation				       IDNA::Punycode(3pm)

NAME
IDNA::Punycode - encodes Unicode string in Punycode SYNOPSIS
use IDNA::Punycode; idn_prefix('xn--'); $punycode = encode_punycode($unicode); $unicode = decode_punycode($punycode); DESCRIPTION
IDNA::Punycode is a module to encode / decode Unicode strings into Punycode, an efficient encoding of Unicode for use with IDNA. This module requires Perl 5.6.0 or over to handle UTF8 flagged Unicode strings. FUNCTIONS
This module exports following functions by default. encode_punycode $punycode = encode_punycode($unicode); takes Unicode string (UTF8-flagged variable) and returns Punycode encoding for it. decode_punycode $unicode = decode_punycode($punycode) takes Punycode encoding and returns original Unicode string. idn_prefix idn_prefix($prefix); causes encode_punycode() to add $prefix to ACE-string after conversion. As a side-effect decode_punycode() will only consider strings beginning with $prefix as punycode representations. According to RFC 3490 the ACE prefix "xn--" had been chosen as the standard. Thus, "xn--" is also the default ACE prefix. For compat- ibility I'm leaving idn_prefix() in the module. Use "idn_prefix(undef)" to get the old behaviour. These functions throws exceptionsn on failure. You can catch 'em via "eval". AUTHORS
Tatsuhiko Miyagawa <miyagawa@bulknews.net> is the original author and wrote almost all the code. Robert Urban <urban@UNIX-Beratung.de> added "idn_prefix()". This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO
http://www.ietf.org/internet-drafts/draft-ietf-idn-punycode-01.txt Encode::Punycode perl v5.8.8 2005-09-01 IDNA::Punycode(3pm)
All times are GMT -4. The time now is 08:17 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy