Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Native SQL and UTF-8

Former Member
0 Likes
1,315

Hello gurus,

This is my code.

Data: ls_histo(255).

ls_histo = 'Créé par ...'.

exec sql. "ORACLE

insert into SAPEDITION.ZMVS_CUSTOMER

X_HISTO values :ls_histo

endexec.

And this is my problem: In Oracle i saw : Cr¿¿ par...

Can you help me ?

In Oracle when i do :

SELECT * FROM sys.props$ WHERE name LIKE 'NLS%CHARACTERSET%';

i obtain this :

NAME

-

-


VALUE$

COMMENT$

NLS_CHARACTERSET

WE8MSWIN1252

Character set

NLS_NCHAR_CHARACTERSET

UTF8

NCHAR Character set

Best regards,

Thierry Chiret

Edited by: Thierry CHIRET on Jul 28, 2008 7:10 PM

5 REPLIES 5
Read only

Former Member
0 Likes
880

Hi Thierry,

did you check the NLS_LANG setting on your client? It dictates to the database what characterset it should expect from the client for an appropriate conversion.

try

NLS_LANG =FRENCH_FRANCE.WE8MSWIN1252

NLS_LANG = LANGUAGE_TERRITORY.CHARACTERSET 

where: 
 LANGUAGE specifies:    
    - language used for Oracle messages,
    - day names and month names
 TERRITORY specifies:
    - monetary and numeric formats,
    - territory and conventions for calculating week and day numbers
  CHARACTERSET:
       - controls the character set used by the client application
         * or it matches your Windows code page 
         * or it set to UTF8 for an unicode application

Read only

Former Member
0 Likes
880

Thanks for your response.

Where can i find the NLS_LANG parameter ?

I use the table DBCON for my connection and i don't know where are her client's parameters.

Best regards,

Thierry Chiret

Read only

0 Likes
880

> Thanks for your response.

>

> Where can i find the NLS_LANG parameter ?

>

> I use the table DBCON for my connection and i don't know where are her client's parameters.

>

>

> Best regards,

>

> Thierry Chiret

>In Oracle i saw : Cr¿¿ par...

It's an ORACLE client setting.

It's from where you start the application that showed the wrong characters.

Setting depends on the OS you use on the client.

i.e. if it's Windows: you would set it in the registry or in the environment variables.

The display of the data has nothing todo with the characters stored in the database.

If your database is UTF8 - fine.

Choose a NLS_LANG that can convert the characters display into french.

If you have not an UTF8 aware application you must give some clue to it how to handle

special characters you stored in the database. If your client application (i.e. SQLPLUS) uses ORACLE middleware you would do this with NLS_LANG.

yk

Read only

Former Member
0 Likes
880

The issue was in the DBCON-CON_ENV to append :WE8MSWIN1252

Thanks

Best regards

Thierry Chiret

Read only

0 Likes
880

And how was the connection string will look completely?

thanks.

Roman