Search code examples
oraclevbscriptasp-classicoledbado

Upside down question mark instead real character after changing from MSDAORA provider to OraOLEDB provider


We have

  • Classic ASP (VBscript) application which render the form to be filled (charset=windows-1252)
  • VB6 COM+ application (referencing ADO 2.1) which receive the information from the form and persist to an Oracle 11g R2 Database (into a Varchar2 field)

We try to copy and paste a text from a Word 2010 document containing these kind of character: " ’ ", " – " and so on. To be more specific the only characters that OraOLEDB can't handle are:

¤  ¦  ¨  ´  ¸  ¼  ½  ¾  ƒ  ˆ  ˜  –  —
‘  ’  ‚  “  ”  „  †  ‡  •  …  ‰  ›  ™

It works fine when using MSDAORA provider but these character are persisted as upside down question mark when using OraOLEDB provider.

The thing is that we must use OraOLEDB provider to work with some CLOB fields.

What can we do?


Solution

  • I had this problem in a Ruby app, when you copy and paste from office documents you can get a text encoded in a charset which gives trouble further in your transfer. I therefor convert the pasted text first to UTF-8 and no longer have these problems. You can do the conversion before submitting clientwise or in your receiving ASP before feeding to the database. I found an example how to convert from one charset to another for ASP but you'll have to adjust it to your needs Classic ASP - How to convert a UTF-8 string to UCS-2?