oracle oracle中的希腊字符集

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6046384/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-18 23:42:46  来源:igfitidea点击:

greek character set in oracle

oracle

提问by Olga Anastasiadou

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.

我在 oracle 11g 中遇到希腊字符的问题。它只显示一些希腊字符和所有其他带有“?”的字符。我已经完成了上面的所有事情,我在互联网上找到了但无法解决这个问题。

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.

我使用 win vista(俄语/英语版本)并设置了希腊语 mui。我已将注册表中的 NLS_LANG 更改为 EL8MSWIN1253(我已更改),我的系统 nls_lang 在注册表中也是 1253。

When i call:

当我打电话时:

SELECT * FROM NLS_INSTANSE_PARAMETERS

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

我得到NLS_LANGUAGE=AMERICANNLS_TERRITORY=AMERICA。我用 Unicode 字符集设置了 oracle。

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 nothing changes.

Oracle 说“会话已更改”但没有任何变化。

Can anyone please help me?

谁能帮帮我吗?

回答by zzp

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:

在 Windows 中:不要将在命令外壳/命令提示符(在 Windows 下)中使用的字体与 Windows 字体(例如,在 Windows 应用程序中使用的字体,如 SQL Developer)混淆。如果您希望在命令提示符下的 SQL*Plus 下正确显示希腊字符:

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

活动代码页: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

737 对应于 EL8PC737 Oracle Client 字符集(NLS_LANG 的第三部分)。请参见:http: //www.oracle.com/technetwork/database/database-technologies/globalization/nls-lang-099431.html#_Toc110410555

Set the Oracle NLS environment variable:

设置 Oracle NLS 环境变量:

C:\> set NLS_LANG= GREEK_GREECE.EL8PC737

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

现在登录 SQL*Plus,您将能够在查询结果中正确地看到希腊字符。

Make analogous settings for any other national language.

对任何其他国家语言进行类似设置。

Panos Zafiropoulos

帕诺斯·扎菲罗普洛斯

回答by Anders Lindahl

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

您是否在注册表中将 NLS_LANG 设置为.EL8MSWIN1253(注意前缀点)?

The format of NLS_LANG is this:

NLS_LANG 的格式是这样的:

NLS_LANG = language_territory.charset

...and the Oracle? Database Globalization Support Guide manualwrites:

……还有神谕?数据库全球化支持指南手册写道:

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.

NLS_LANG 定义的所有组件都是可选的;任何未指定的项目都使用其默认值。如果指定地域或字符集,则必须包括前面的分隔符[地域的下划线 (_ ),字符集的句点 (.)]。否则,该值将被解析为语言名称。

回答by Gary Myers

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

只是要指出字符集转换以两种方式发生。因此,如果客户端在其数据库会话指示美国字符集时插入“希腊”字符,则该字符将从美国转换为 UTF-8(或任何 DB 字符集)。带有希腊字符集的会话的后续选择将导致字符从 UTF-8 转换为希腊语,这可能不是您开始时使用的。

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.

使用select DUMP(col)查看它们在数据库中记录的字节数,然后可以计算出数据库中是否有正确的字符表示。

回答by gajjar rohit

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

变量名称:NLS_LANG 变量值:GREEK_GREECE.EL8MSWIN1253

Variable name : NLS_NUMERIC_CHARACTERS Variable Value : .,

变量名称:NLS_NUMERIC_CHARACTERS 变量值:.,