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: Select UNICODE (UTF8) data as octets from database Options

Re: Select UNICODE (UTF8) data as octets from database Options

From: OracleServer <helge.hauan_at_applica.no>
Date: 8 May 2007 08:24:26 -0700
Message-ID: <1178637866.804221.221650@h2g2000hsg.googlegroups.com>


On May 7, 10:32 am, Laurenz Albe <inv..._at_spam.to.invalid> wrote:
> OracleServer <helge.ha..._at_applica.no> wrote:
> > My database (10g) has been created with database character set to
> > "Unicode standard UTF-8 AL32UTF8".
>
> > The data has been stored correctly. Used select dump(name, 1016)
> > from...
> > Query returned:
> > Len = 3 CharacterSet=AL32UTF8: e4, b8, 84
> > UTF-8 encoding of Unicode character (Traditional Chinese): ?
>
> > Can someone tell me how to select this col into a ProC VARCHAR2
> > variable? The query in my ProC code returns this a value, but the
> > lenght is equal to 1. How can I get all the 3 octets into my VARCHAR2
> > variable?
> > Does it depends on any compilation option, or the PC locale?
>
> It should depend only on the NLS_LANG environment variable.
>
> You must set it to something that supports this 'shang' character,
> like 'SIMPLIFIED CHINESE_CHINA.ZHS16GBK' or AMERICAN_AMERICA.AL32UTF8
>
> There is a precompiler option NLS_CHAR with which you can specify which
> host variables will be treated as multibyte variables.
>
> Yours,
> Laurenz Albe- Hide quoted text -
>
> - Show quoted text -

Hi again.
Tried both NLS_LANG and NLS_CHAR without success. In Pro*C the select statements returns wide character string, not octet character string. I solved the problem by making a convert coding-function WcsToUTF8. Received on Tue May 08 2007 - 10:24:26 CDT

Original text of this message

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