开发者

Getting SQLPlus to spool out Unicode characters, are being output as?

开发者 https://www.devze.com 2023-03-30 17:28 出处:网络
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

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 "e开发者_StackOverflown_US.UTF-8", I'll post the full output upon request.

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.

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


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
0

精彩评论

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

关注公众号