Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Dealing with multi-byte character using OCI on HP-UX
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,OCIHandleAlloc( (dvoid *) oci_envhp, (dvoid **) &oci_stmhp, OCI_HTYPE_STMT,
(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);
(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