Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: UTF8 note decoded when reading from the database

Re: UTF8 note decoded when reading from the database

From: <johnny9_at_gmail.com>
Date: 16 Feb 2007 08:12:49 -0800
Message-ID: <1171642369.593131.223450@l53g2000cwa.googlegroups.com>


On Feb 15, 5:40 pm, "Scott" <nos..._at_nomail.com> wrote:
> <john..._at_gmail.com> wrote in message
>
> news:1171584496.897161.70370_at_a34g2000cwb.googlegroups.com...
>
>
>
> >I have a VB6 / ADO application that can successfully write japanese
> > characters to a UTF8 10g database, but when I read from a CHAR/
> > VARCHAR2 field the string looks as though it is the ninary
> > representation of utf8... ie, it looks like it did not get converted
> > from UTF8.
>
> > I have NLS_LANG set to AMERICA.UTF8.
>
> > My Oracle Client Drivers are 9.2.
>
> > My Oracle Database is 10g.
>
> > I can confirm that the data has been written correctly to the database
> > by using another tool to read the fields. I will also be using other
> > languages in the database.
>
> > Any ideas on what I can do so that Oracle converts the fields
> > correctly?
>
> Well, if you are setting your NLS_LANG to UTF8 and you know that UTF8 is
> stored in the database then oracle is not doing anything to convert the data
> since the client and db use the same character set. (note it is a rare
> thing to do typically you have some other charset defined on the windows
> side, but technically it is possible) Whatever gui you use will be
> responsible for displaying the utf8 data perhaps your gui component is not
> utf8 aware.
>
> There are two windows apps I know of to display UTF8 data. isqlplus ( this
> is the web version ) or sql developer ( when you set the charset to utf8).
>
> If you have access to metalink check out note 179133.1
>
> HTH
> Scott.

Unfortunately no I do not have access to metalink.

Is there a recommended NLS_LANG setting (or other setting) to use when you have a server application that collects data from all over the world in a variety of languages?

Basically we have UTF8 encoded files coming in from all over the world and we not only store the raw UTF8 data as a whole in a BLOB but we strip portions of it out and place them in a more normalized fashion (such as a person's name, location, a title, notes, etc.) The UTF8 data is typically all in one language, but we can receive a file from Singapore, then one from Japan, then one from Spain, etc.

Our database is "UTF8", how would we go about reading/writing to it in a variety of languages?

If we set NLS_LANG on the client pc to AMERICA.UTF8 we can successfully write international characters to the DB fields (without doing any kind of explicit encoding in out code) but when we read back from the same fields the data looks as though it has not been decoded.

I'm wondering if this is because the database is 10g and the client oracle drivers are 9.x? Received on Fri Feb 16 2007 - 10:12:49 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US