Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Unicode to Ascii Oracle 10g

Posted on 2013-01-02
12
810 Views
Last Modified: 2013-01-02
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 ?
0
Comment
Question by:shelbyinfotech
  • 5
  • 4
  • 2
  • +1
12 Comments
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 38737041
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?
0
 

Author Comment

by:shelbyinfotech
ID: 38737053
All the data will be ASCII
0
 
LVL 32

Expert Comment

by:awking00
ID: 38737196
What does your view code look like?
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 38737216
>>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.
0
 
LVL 15

Accepted Solution

by:
Franck Pachot earned 400 total points
ID: 38737289
Hi,
If the NLS_LANG is set (properly), the conversion should be automatic.
Regards,
Franck.
0
 

Author Comment

by:shelbyinfotech
ID: 38737310
Once selected in SQL Plus...yeah I get the data...I can't get it from the old odbc driver that msaccess is using
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 38737319
Try setting NLS_LANG on the Client's client side as franckpachot suggested.
0
 

Author Comment

by:shelbyinfotech
ID: 38737345
Where would that be ? In the Oracle Client or ODBC ?
0
 
LVL 76

Assisted Solution

by:slightwv (䄆 Netminder)
slightwv (䄆 Netminder) earned 100 total points
ID: 38737352
It is an environment variable Oralce uses (registry in Windows):
http://docs.oracle.com/cd/E11882_01/server.112/e10729/ch3globenv.htm#NLSPG189
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 38737634
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
0
 

Author Closing Comment

by:shelbyinfotech
ID: 38737693
Thanks ....just had to find WHERE in the registry...btw it was in ORACLE_ALL_HOMES
0
 
LVL 15

Expert Comment

by:Franck Pachot
ID: 38737702
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.
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question