Skip to Main Content

Database Software

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!

How to convert Spanish char from AL32UTF8 to ISO-8859-1 with sqlplus in linux?

user1026106Aug 4 2014 — edited Jan 21 2015

I have the server 11g with the NLS_CHARACTERSET with AL32UTF8.  I need to have a varchar2 column, which contains Spanish character, converted to ISO-8859-1 from the sqlplus output.

So, I set in the bash shell script

'export NLS_LANG=AMERICAN_AMERICA.UTF8'

or

'export NLS_LANG=AMERICAN_AMERICA.AL32UTF8'

And then, I do

iconv -f UTF-8 -t ISO_8859-1//TRANSLIT infile.txt > outfile.txt

Both NLS_LANG settings have the problem.

For the both lang settings, if I do

file -bi infile.txt

it gives text/plain; characterset=utf-8

However

iconv translates

¿Quién Gómez to ¿Quien Gomez.

Why are é and ó and others not translated correctly?

How do I translated the Spanish character correctly from the sqlplus output?

Thank you.

This post has been answered by Sergiusz Wolicki-Oracle on Aug 6 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 18 2015
Added on Aug 4 2014
12 comments
10,299 views