在oracle中,如何更改会话以显示UTF8? [英] In oracle, how do I change my session to display UTF8?

查看:76
本文介绍了在oracle中,如何更改会话以显示UTF8?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一生都无法弄清楚Oracle的加密语法.这是Oracle 10g

I can't figure out Oracle's encryptic syntax for the life of me. This is Oracle 10g

我会话的NLS_LANGUAGE当前默认为AMERICAN. 我需要能够显示UTF8字符.

My session's NLS_LANGUAGE is currently defaulting to AMERICAN. I need to be able to display UTF8 characters.

下面是我的一些尝试,所有尝试都不正确:

Below are some of my attempts, all incorrect:

ALTER SESSION SET NLS_LANGUAGE='UTF8'
ALTER SESSION SET NLS_LANGUAGE='AMERICAN_AMERICA.UTF8'

什么是秘密命令?

推荐答案

字符集是语言环境的一部分,该语言环境由NLS_LANG的值确定.如该文档清除,这是操作系统变量:

The character set is part of the locale, which is determined by the value of NLS_LANG. As the documentation makes clear this is an operating system variable:

NLS_LANG设置为环境 在UNIX平台上的变量. NLS_LANG 在Windows的注册表中设置 平台.

NLS_LANG is set as an environment variable on UNIX platforms. NLS_LANG is set in the registry on Windows platforms.

现在,我们可以使用ALTER SESSION来更改两个语言环境元素NLS_LANGUAGE和NLS_TERRITORY的值.但是,a,不是这个字符集.这种差异的原因是-我认为-语言和地区只会影响Oracle解释存储数据的方式,例如显示大量数字时是显示逗号还是句点. Wheareas字符集与客户端应用程序如何呈现显示的数据有关.此信息由客户端应用程序在启动时获取,并且无法从内部进行更改.

Now we can use ALTER SESSION to change the values for a couple of locale elements, NLS_LANGUAGE and NLS_TERRITORY. But not, alas, the character set. The reason for this discrepancy is - I think - that the language and territory simply effect how Oracle interprets the stored data, e.g. whether to display a comma or a period when displaying a large number. Wheareas the character set is concerned with how the client application renders the displayed data. This information is picked up by the client application at startup time, and cannot be changed from within.

这篇关于在oracle中,如何更改会话以显示UTF8?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆