Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: OCI problem: error reading french word with accent in first position
Laurent Rougé wrote:
> Hi all
>
> First of all: sorry for my english.
>
> I'm Using Oracle9iR2 on Linux RedHat 9
> I'm not familiar with OCI, but i have to maintain an OCI application.
>
> We have a problem reading VARCHAR2 column where the string begins with
> accent french alphabetical character like "é" or "à" or "è", the process
> returns a NULL string, whereas it returns the good string when it starts
> with non accent alphabetical character.
>
> The string is OK when i read it through sql*plus for instance.
>
> We use this sequence of OCI methods:
>
> Result = OCIStmtPrepare(p_sql, p_err, (CONST OraText*)
> str_query.c_str(), query_size, OCI_NTV_SYNTAX, mode);
> Result = OCIStmtExecute(p_svc, p_sql, p_err, 0, 0, NULL, NULL, CommitMode);
> parm_status = OCIParamGet( p_sql, OCI_HTYPE_STMT, p_err,
> &mypard_tmp,(ub4) counter);
>
> while (parm_status ==OCI_SUCCESS)
> {
> OCIAttrGet((dvoid*) mypard, (ub4) OCI_DTYPE_PARAM, &col_name,
> &col_name_len, (ub4) OCI_ATTR_NAME,(OCIError *) p_err );
> OCIAttrGet((dvoid*) mypard, (ub4) OCI_DTYPE_PARAM ,(dvoid*) &dtype,(ub4
> *) 0, (ub4)OCI_ATTR_DATA_TYPE,(OCIError *) p_err);
> }
>
> Any help would be appreciated.
> Thanks in advance
> Laurent Rougé
>
Don't know if you have checked your NLS settings in your database and
front end application. Setting NLS_SORT wrong can cause this kind of
sorting issues. If you google on SORT french oracle or search at
tahiti.oracle.com you will see that sorting in Oracle is more than just
a parameter.
Hope this helps,
Dick
Received on Fri Jan 21 2005 - 03:39:01 CST
![]() |
![]() |