Hi Bruce, David, thank you both for your help. I think I might read carefully the link Bruce provided and already set the NLS_LANG to the appropriate value.
Best regards, Jefferson ELIAS Service Applications Informatiques Database Administrator Tel.: +32 4 366 83 56 Fax: +32 4 366 72 99 Email : jefferson.el...@chu.ulg.ac.be Email DBA : db....@chu.ulg.ac.be ----- Mail original ----- De: "Bruce Johnson" <john...@pharmacy.arizona.edu> À: "Jefferson Elias" <jefferson.el...@chu.ulg.ac.be> Envoyé: Vendredi 13 Mai 2016 19:32:55 Objet: Re: help to connect On May 12, 2016, at 10:29 PM, Jefferson Elias < jefferson.el...@chu.ulg.ac.be > wrote: Hi Bruce, Meir, thank you for your help. The file was already saved without BOM and it wasn't working at all when adding the BOM descriptor into the file. Bruce's suggestion about NLS_LANG settings solved the problem of connection : I changed it temporarily from NLS_LANG=american_america.WE8MSWIN1252 to NLS_LANG=american_america.UTF8 and managed to connect to the instance with the exact same password. While it works now, I begin to wonder if there could not be data corruption in case of modifications as the target database instance uses WE8MSWIN1252 and my terminal uses UTF8 (at NLS_LANG level). No. NLS_LANG should be set by your client; your client tells the DB which setting it’s using this way and the database does the rest. Here is more than you ever wanted to know about NLS_LANG < http://www.oracle.com/technetwork/products/globalization/nls-lang-099431.html > :-) This The Priority of NLS Parameters related to NLS_LANG is relevant to your situation, but basically you need to tell Oracle which character set you’re using when you connect, so setting NLS_LANG to ‘ american_america.UTF8’ as you did is the correct permanent fix for your problem. <blockquote> I think I might be customizing non-oracle shell environment before running the script but I don't know if it's something that useful... What's your point about it ? </blockquote> 99% of my work is in web-based CGI apps, so making sure that the environment variables are the same in the web processes as the interactive shells is a common issue. Also, depending on how you’re running the script, you may need to make sure things are set (eg: in cron jobs, etc) because depending on how the shell script is invoked, things like .bashrc may or may not be used. I mention it because it’s a common issue people face when "sqlplus or SQL Designer work just fine, how come DBI fails??!!” and has bitten me more than once. -- Bruce Johnson University of Arizona College of Pharmacy Information Technology Group Institutions do not have opinions, merely customs