Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

iconv command fails to convert

David JamesJan 2 2014 — edited Jan 2 2014

Hello, and Happy 2014 to you all....

We have a number of files in a directory, some (when I run file -bi <filename>) in us-ascii, a few in UTF-8

I need to ensure that all the files in the directory are converted to UTF-8 before they are FTP-ed to elsewhere.

I am failing in this regard.

I am using the following, to change an ascii file to utf8:

iconv -f us-ascii -t utf8 CM2013jul161103.BMI > CM2013jul161103.BMI_utf8

When I use file -bi CM2013jul161103.BMI_utf8, I can see that it remains at ascii mode     :

file -bi CM2013jul161103.RBI_utf8

text/plain; charset=us-ascii

Does it still say ASCII since there are no UTF8 characters in the file to begin with???

Where am I going wrong (other than coming to work so soon after New Year's)?

Thanks.

11.2.0.3

RHEL 5.5

Aha, I just found this:

This command try to autodetect the encoding that a file is using. If no special characters are detected inside the text file, “file” will tell us that the encoding is us-ascii,

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 30 2014
Added on Jan 2 2014
2 comments
748 views