开发者

greek character set in oracle

I have a problem with greek characters in oracle 11g. It onlys shows some greek characters and all the others with '?'. I have done all the things above, that I found in internet but can't fix this.

I use win vista (rus/eng version) and set up the greek mui. I've changed NLS_LANG in registry to EL8MSWIN1253 (i've changed that), my system nls_lang is 1253 in registry too.

When i call:

SELECT * FROM NLS_INSTANSE_PARAMETERS

I get NLS_LANGUAGE=AMERICAN and NLS_TERRITORY=AMERICA. I set up oracle with Unicode character set.

I tried to call

ALTER SESSION SET NLS_LANG=GREEK_GREECE.EL8MSWIN1253

but that didn't work. When i call

ALTER SESSION SET NLS_LANGUAGE=GREEK

or

ALTER SESSION SET NLS_TERRITORY=GREECE

Oracle says "Session altered" but开发者_JAVA百科 nothing changes.

Can anyone please help me?


In Windows: Don’t mess up fonts being used in Command Shell / Command prompt (under Windows) with Windows fonts (e.g. fonts being used in Windows applications, such in SQL Developer). If you wish to display Greek characters correctly under SQL*Plus in Command prompt:

Identify the active Code Page:

C:\> chcp

The system should respond with the code page number. This for Greek language should be:

Active code page: 737

The 737 corresponds to the EL8PC737 Oracle Client character set (3rd part of NLS_LANG). See at: http://www.oracle.com/technetwork/database/database-technologies/globalization/nls-lang-099431.html#_Toc110410555

Set the Oracle NLS environment variable:

C:\> set NLS_LANG= GREEK_GREECE.EL8PC737

Now logging in SQL*Plus you will be able to see Greek characters correctly in query results.

Make analogous settings for any other national language.

Panos Zafiropoulos


Did you set NLS_LANG in the registry to .EL8MSWIN1253 (notice the prefix dot)?

The format of NLS_LANG is this:

NLS_LANG = language_territory.charset

...and the Oracle® Database Globalization Support Guide manual writes:

All components of the NLS_LANG definition are optional; any item that is not specified uses its default value. If you specify territory or character set, then you must include the preceding delimiter [underscore (_) for territory, period (.) for character set]. Otherwise, the value is parsed as a language name.


Just to point out that character set conversion occurs BOTH ways. So if a client inserts a 'greek' character when their database session indicates an american character set, then the character will be converted from American to UTF-8 (or whatever the DB character set is). A subsequent select by a session with a greek character set will result in the translation of the character from UTF-8 to greek, which might not be what you started with.

Use select DUMP(col) to see they bytes recorded in the database, then you can work out whether the database has the correct representation of the character.


Right Click on my computer > Advance system setting > advance > Environment Variables

Click on System variable on New TAB

Variable name : NLS_LANG Variable Value : GREEK_GREECE.EL8MSWIN1253

Variable name : NLS_NUMERIC_CHARACTERS Variable Value : .,

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜