SQL*Plus (MOSC)

MOSC Banner

Character Set question in sql*plus

edited Jul 4, 2013 4:00AM in SQL*Plus (MOSC) 5 commentsAnswered
Hi,
I have a bash script that executes sql scripts from directory like this:

sqlplus / <<EOF
whenever sqlerror exit sql.sqlcode
spool $DIR_SPOOL/output
`for script_file in $(ls $DIR_SQL)
 do
  echo @$DIR_SQL/$script_file
 done
`
spool off
EOF

The database character set is AL32UTF8 and linux server uses locale UTF-8. LNS_LANG is AL32UTF8.
The problem is the file encoding of sql scripts from $DIR_SQL. They are developed in WINDOWS-1252 encoding.

The first solution I found was set NLS_LANG to WE8MSWIN1252. The problem is the output of commands and spool files. They change to WINDOWS-1252, but I want it in UTF-8 encoding.

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center