Retrieving UTF8 from Oracle with native driver

Creating desktop or client-server database solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
benr_mc
Posts: 26
Joined: Mon Apr 17, 2006 9:22 pm

Retrieving UTF8 from Oracle with native driver

Post by benr_mc » Mon Feb 17, 2014 9:31 pm

Has anyone successfully used LiveCode's database functions, with the native Oracle driver, to retrieve UTF8?

The application is running on a Windows 2008r2 machine, addressing Oracle Database 11g Release 11.2.0.2.0 - 64bit Production.

The particular column in the database is apparently in UTF8, according to the Oracle SQL Developer application. And making the SQL query in that app returns the text as expected. But making the query through the standalone built with LiveCode (commercial license, various versions), characters such as the degree symbol, or a right single quote, come through as "?". I don't think this is happening in my script - I think that the data has been pre-converted before LiveCode gets it.

Googling suggests that Oracle has a concept of the client character set which is initialised from 'environment' variables (NLS_LANG, NLS_CHARACTERSET?) at the time of the first connection, and this environment set is then shared for future connections (on that machine, or for that application? until relaunch of machine, or reboot or app?). If true then no kind of SQL commands issued once the database connection has been opened will change the setting; it would be necessary to somehow set the environment variable at least before opening the connection.

Is this the case, and is there any way to do this?

Has anyone succeeded in doing this? Is anyone who is familiar with the Oracle driver able to suggest where the translation might be occurring?

TIA,

Ben

Post Reply

Return to “Databases”