title: Character encoding issue in Oracle PL/SQL
body: <p>I'm facing a character discrepancy issue while extracting data from db tables.</p>
  
  <p>I've written a PL/SQL code to spool some data to .txt file from my db tables and running this sql using unix shell but when I'm getting the spooled file, the result set is a changed one from the one at back end. </p>
  
  <p>For example:  </p>
  
  <pre><code>At back end: SADETTÝN
  
  In Spooled txt file :  SADETTŸN 
  </code></pre>
  
  <p>If you look at the <code>Y</code> character, it is a changed one. I want to preserve all the characters the way they are at back end. </p>
  
  <p>My db's character set:</p>
  
  <pre><code>SELECT * FROM v$nls_parameters WHERE parameter LIKE 'NLS%CHARACTERSET'
  PARAMETER              VALUE 
  NLS_CHARACTERSET       WE8ISO8859P1 
  NLS_NCHAR_CHARACTERSET WE8ISO8859P1 
  </code></pre>
  
  <p>And Unix NLS_LANG parameter :</p>
  
  <pre><code>$ echo $NLS_LANG
  AMERICAN_AMERICA.WE8ISO8859P1
  </code></pre>
  
  <p>I tried changing NLS_LANG parameter to WE8ISO8859P9(Trukish characterset) but no help!</p>
  
  <p>Could anyone let me know the solution to this problem?</p>