使SQLPlus假冒Unicode字符,输出为? [英] Getting SQLPlus to spool out Unicode characters, are being output as?

查看:76
本文介绍了使SQLPlus假冒Unicode字符,输出为?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使Oracle sqlplus(10.2)在Linux计算机上假脱机Unicode数据.除了检查语言环境设置并将NLS_LANG设置为AL32UTF8之外,我已经找到了对该问题的一些讨论,但没有明确的答案.所有语言环境信息都设置为"en_US.UTF-8",我将根据要求发布完整的输出.

I am attempting to get Oracle sqlplus (10.2) to spool out Unicode data on a Linux machine. I have found several discussions of this issue, but no clear answers, other than to check locale settings and set NLS_LANG to AL32UTF8. All locale info is set to "en_US.UTF-8", I'll post the full output upon request.

操作系统(vi等)将识别并接受Unicode字符,而不会出现问题.但是,当使用sqlplus时,所有非ASCII字符都更改为?.人物. Oracle数据库的NLS_CHARACTERSET设置为AL32UTF8,而NLS_NCHAR_CHARACTERSET设置为AL16UTF16.

The OS (vi, etc.), will recognize and accept Unicode characters without issue. However, when using sqlplus, all non-ASCII characters are changed to ? characters. The Oracle DB has NLS_CHARACTERSET set to AL32UTF8, and NLS_NCHAR_CHARACTERSET set to AL16UTF16.

我是否缺少一些需要为sqlplus本身设置的设置或开关?任何想法将不胜感激.

Am I missing some setting or switch that needs to be set for sqlplus itself? Any ideas would be much appreciated.

推荐答案

我找到了答案.显然,在外壳程序脚本中设置NLS_LANG(正确的设置是AMERICAS_AMERICA.AL32UTF8)不起作用.必须将其导出:

I found the answer to this. Apparently, setting NLS_LANG (the correct setting is AMERICAS_AMERICA.AL32UTF8) in the shell script does not work. It must be exported:

export NLS_LANG=AMERICAN_AMERICA.AL32UTF8

这篇关于使SQLPlus假冒Unicode字符,输出为?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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