Avatar of shelbyinfotech
shelbyinfotech
 asked on

Unicode to Ascii Oracle 10g

I have a view created in Oracle 10g that outputs one field, which is returned Unicode.

My clients have old ODBC drivers that do not recognize Unicode.

How do I convert this field to ASCII ?
Oracle DatabaseMicrosoft Access

Avatar of undefined
Last Comment
Franck Pachot

8/22/2022 - Mon
slightwv (䄆 Netminder)

Depending on what unicode characters are in the data, it may not be possible.  For example, how would you convert a chinese character to simple ascii?

Can you provide some sample data and expected results?
shelbyinfotech

ASKER
All the data will be ASCII
awking00

What does your view code look like?
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
slightwv (䄆 Netminder)

>>All the data will be ASCII

Then why can't you just select it?  an 'A' in a unicode database should be an 'A' when you select it out.

I agree with awking00, let's take a look at your view code.
ASKER CERTIFIED SOLUTION
Franck Pachot

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
shelbyinfotech

ASKER
Once selected in SQL Plus...yeah I get the data...I can't get it from the old odbc driver that msaccess is using
slightwv (䄆 Netminder)

Try setting NLS_LANG on the Client's client side as franckpachot suggested.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
shelbyinfotech

ASKER
Where would that be ? In the Oracle Client or ODBC ?
SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
slightwv (䄆 Netminder)

I doubt this will solve the issue since the Unicode is likely coming from the default database characterset but wanted to throw it out there just in case it will trick the ODBC drivers.

The CONVERT sql function:
http://docs.oracle.com/cd/E11882_01/server.112/e26088/functions034.htm#SQLRF00620
shelbyinfotech

ASKER
Thanks ....just had to find WHERE in the registry...btw it was in ORACLE_ALL_HOMES
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
Franck Pachot

sqlplus and odbc should not use the same NLS_LANG as DOS and Windows codepage are different.
Are you sure that you have the right encoding in the database ? You should use DUMP function to check.
Maybe the data was entered with an incorrect setting.