Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
571 views
in Technique[技术] by (71.8m points)

oracle - SQL Developer Special Chars

I am having problems with an Oracle Database and the ASCII char encoding.

I'm trying to make Update sentences on Varchar2() columns with strings that contains special characters like á, é, í, ó, ú, (spanish) etc.

Each time i recover the data from that column, as for example, instead of seeing 'ó', i got 'é??' or '髇'.

I'm writing Update sentences like:

UPDATE TABLE_1
SET DESCRIPTION = 'THIS IS A TEXT WITH SPECIAL CHAR ó éND'
WHERE ID = '1';

and when i do:

SELECT ID ||' | '|| DESCRIPTION FROM TABLE_1 WHERE ID = '1';'

I got:

1 | THIS IS A TEXT WITH SPECIAL CHAR 髇 END

I'm using SQL Developer Version 4.0.3

Thank you for the help.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You have to check the Nlslang in you registery and the database characterset, it seems they are different.

Example:

SELECT * FROM v$nls_parameters WHERE parameter LIKE 'NLS_CHARACTERSET'
/

PARAMETER                                                        VALUE
---------------------------------------------------------------- ----------------------------------------------------------------
NLS_CHARACTERSET                                                 AL32UTF8

from the registery go to oracle registery and in nlslang add value American_America.Al32UTF8(as an example) similar what you have in the database.

By the way sometime also the issue its from the langauge in the control panel , if you want to use french characters is better to assign it french. (Control PanelClock, Language, and Region... then in administrative tab)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...