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: OCI problem: error reading french word with accent in first position

Re: OCI problem: error reading french word with accent in first position

From: Dick Westeneng <dwesteneng_at_mail.com>
Date: Tue, 25 Jan 2005 10:14:15 +0100
Message-ID: <41F60DE7.3050703@mail.com>


Laurent Rougé wrote:

> Hi Dick
> 
> It's not a problem of NLS settings because words are well stored in the 
> database and they are generated from the same "client" from where they 
> are read.
> 
> It's seems to be a READ problem with the way we've implemented OCI. I 
> think that word which begins with a stressed letter like "é", is 
> internally stored in Oracle something like this: "/é". And "/" seems to 
> be interpreted like a "NULL" string.
> 
> Thanks in advance for help.
> Laurent Rougé
> 
> Dick Westeneng a écrit:
> 

>> 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

>
>
Hi Laurent,

NLS_SORT has all to do with the sorting of the characters when reading your data.

Kind regards,
Dick Received on Tue Jan 25 2005 - 03:14:15 CST

Original text of this message

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