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

Home -> Community -> Usenet -> c.d.o.misc -> Dealing with multi-byte character using OCI on HP-UX

Dealing with multi-byte character using OCI on HP-UX

From: Jason Liang <jsnliang_at_hotmail.com>
Date: 13 Nov 2004 15:41:59 -0800
Message-ID: <e35f0def.0411131541.3348dd1a@posting.google.com>


Hi All,

I have a problem about dealing with multi-byte characters(Japanese).I use OCI and logon to the database as folows.


OCIInitialize((ub4) OCI_DEFAULT, (dvoid *)0,

(dvoid * (*)(dvoid *, size_t)) 0,
(dvoid * (*)(dvoid *, dvoid *, size_t))0,
(void (*)(dvoid *, dvoid *)) 0 );
OCIEnvInit( (OCIEnv **) &oci_envhp, OCI_DEFAULT, (size_t) 0, (dvoid **) 0 ); OCIHandleAlloc( (dvoid *) oci_envhp, (dvoid **) &oci_errhp, OCI_HTYPE_ERROR, (size_t) 0, (dvoid **) 0);
OCIHandleAlloc( (dvoid *) oci_envhp, (dvoid **) &oci_stmhp, OCI_HTYPE_STMT,
                   (size_t) 0, (dvoid **) 0);
OCILogon(oci_envhp, oci_errhp, &oci_svchp, (dvoid *) usrid, (ub4) strlen(usrid),
                                        (dvoid *) usrpwd, (ub4)
strlen(usrpwd), (dvoid *) conbuf, (ub4) strlen(conbuf));

When I write multi-byte characters into the database, I find the characters are
changed to single-byte ones.

The system I use is HP-UX. I tried to use NLS_LANG variable, NLS_LANG = japanese_japan.ja16sjis, but failed to logon into the database.

Could somebody give me some advice on solving this problem?

Thank you in advance.

Jason Liang. Received on Sat Nov 13 2004 - 17:41:59 CST

Original text of this message

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