Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 
 Home
 E-mail Us
 Oracle Articles
New Oracle Articles


 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog


 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

 Applications
 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

 
 

Single Quote Apostrophe Marks Change to Upside-Down Question Marks

Expert Oracle Database Tips by Donald BurlesonConsulting

February 10, 2015

Single Quote Apostrophe Marks Change to Upside Down Question Marks

Question: We are extracting columns from Oracle tables that contain single quote names with apostrophes:

O'Reilly
O'Malley

The flat files are changing the quote marks (apostrophes) into upside-down question marks, displaying a special character ' as ¿

How do we avoid this?

Answer:  If you are on Windows, this is a "single quote" conversion to a upside-down question mark is a common problem may might be fixed by converting to a character set such as WE8MSWIN1252. 

Try this test in SQL*Plus:

 set nls_lang = WE8MSWIN1252
export nls_lang
spool myfile.txt
select last_name from mytab
spool off;

The very first step in diagnosing a special character in Oracle SQL output is to consult the Oracle National Language Support documentation for what character sets supports the single quote apostrophe on your OS flat files, usually a UNICODE type character set.

Next, read these important notes on testing "special characters" as part of your nls_lang setting.

As you see, Oracle will replace characters that are not within its character set with the upside-down question mark and your problem is that either the database or the flat files has an incorrect character set as defined by your nls_lang parameter.  The upside-down question mark means that the character set does not support the quote mark.   See MOSC Note 275138.1 (Cannot Map Unicode To Oracle Character) for complete resolution details.

An apostrophe is not really a "special" character, and internally, a single quote (apostrophe) is represented by an ASCII "0x27".  You need to choose a character set that includes single quotes.  

An Interweb search says that an apostrophe can be represented in the Windows WE8MSWIN1252 by at least four different codes:

  • 0xb4 - accent mark (´)
  • 0x91 - left single quotation mark (')
  • 0x92 - right single quotation mark (')
  • 0x27 - standard ASCII apostrophe (')  

Beware, the Windows single quote character (aka smart quote) is non-standard and it is is not contained in the WE8ISO8859P1 character set.

 
Get the Complete
Oracle SQL Tuning Information 

The landmark book "Advanced Oracle SQL Tuning  The Definitive Reference"  is filled with valuable information on Oracle SQL Tuning. This book includes scripts and tools to hypercharge Oracle 11g performance and you can buy it for 30% off directly from the publisher.

 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  and include the URL for the page.


                    









Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


 

Copyright © 1996 -  2016

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.


 

��  
 
 
Oracle Training at Sea
 
 
 
 
oracle dba poster
 

 
Follow us on Twitter 
 
Oracle performance tuning software 
 
Oracle Linux poster