accented letters and sql plus/AIX

2.6k views Asked by At

I have a plsql script that I modify in sql developer (encoding = UTF8). I put my script on the server using Filezilla (transfert binary). On the server, the NLS_LANG is AMERICAN_FRANCE.WE8ISO8859P1.

In my script I added :

ALTER SESSION SET NLS_LANG=FRENCH_FRANCE.UTF8; 

I lauch the script in a sql plus session : the characters do not appear properly.

How can I make it work?

Thank you


In a putty session to launch the sql file I write this :

$ORACLE_HOME/bin/sqlplus id/psw@$ORACLE_SID @$P_SQL/myfile.sql

In the file, the display is like this for example :

center 'à è é ê ô à ë î ï ù' skip 1 -

inside a spool.

2

There are 2 answers

0
Lorinczy Zsigmond On BEST ANSWER

First of all, putty's setting Windos/Translation/Remote_character_set and environment variable LC_CTYPE should match, eg: ISO-8859-1 and fr_FR.ISO8859-1; or UTF-8 and fr_FR.UTF-8

Note: LC_CTYPE can be set remotely (putty: Connection/Data/Environment_variables), if /etc/ssh/sshd_config allows if (AcceptEnv)

Also it doesn't hurt if your AIX supports the selected charset, find out with locale -a

If/when every character works in ksh/bash/mc/etc then you can try to experiment with Oracle: set NLS_LANG to american_america.WE8ISO8859P1 or american_america.AL32UTF8 (in sync with LC_CTYPE and Translation)

PS: I think you should set NLS_LANG before starting any Oracle-program, ALTER SESSION doesn't change character set.

0
TenG On

Try setting NLS_LANG to AMERICAN_AMERICA.US8PC437.

See my answer here to a similar question:

when-insert-persian-character-in-oracle-db-i-see-the-question-mark