ODP.NET: OracleXmlType with foreign characters

  • Thread starter Thread starter bonnie
  • Start date Start date
B

bonnie

Hi,

Has anyone got experience in how to get foreign characters properly
out of an object with OracleXmlType type? In the Oracle database, the
foreign characters, e.g. Ä Ö Å from Scandinavian languages, can be
saved correctly. When using an OracleXmlType object to take XML data
out of database, however, the string value which contains those
foreign characters will have some strange unreadable characters
replaced.

How to resolve it? There might be some setting need to be altered for
ODP.NET but I have no clue which it is, how to do and where to find
it. Anyone having any comments on this? Thanks a lot for any response.

bonnie
 
I have worked rather extensively with ODP.NET, but not in a
globalization/localization sense, so I can only suggest you set the
CurrentCulture to Scandanavian before getting the data. That might work.

---

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
 
Hi,

Thanks for the message. Unfortunately changing the CurrentCulture does
not work. If by ODP.net querying a column that is VarChar type, and
assigning the value to a string object, the content is correct. So I
think it's only about OracleXmlType but can't tell what caused it.
Furthermore, it can be about the OracleDataReader object that is used
to read the queried data because the data is shown correctly in Toad.

It just reminds me another problem I encountered a while ago with WSE
1.0. The problem was that if an XmlDocument object is passed as a
parameter of a web method, then the foreign characters in the XML
document were replaced by question marks right after the server
started responding. It turned out to be a bug of WSE1.0 and after
moving to WSE2.0, the problem was solved. Now I am wondering if it is
a bug of ODP.net for Oracle 9.2....
 
Back
Top