时间:2021-07-01 10:21:17 帮助过:10人阅读
--------------注意:如下操作是在RHEL的VNC中执行的,并不是在secureCRT中执行的。------------
--------------原因:若是在secureCRT执行,m3会显示成:m鲁,见如下的截图,是啥原因我还没研究--
如下是实验的过程:
- [oracle@lei1 ~]$ export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
- [oracle@lei1 ~]$ sqlplus scott/aaaaaa
- SQL*Plus: Release 11.2.0.3.0 Production on Sat Jun 20 10:02:14 2015
- Copyright (c) 1982, 2011, Oracle. All rights reserved.
- Connected to:
- Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
- With the Partitioning, OLAP, Data Mining and Real Application Testing options
- SQL> desc test_t1;
- Name Null? Type
- ----------------------------------------- -------- ----------------------------
- C1 VARCHAR2(20)
- SQL> truncate table test_t1;
- Table truncated.
- SQL> insert into test_t1 values('m³');
- 1 row created.
- SQL> commit;
- Commit complete.
- SQL> select * from test_t1;
- C1
- --------------------
- m³
- SQL> select property_value from database_properties where property_name='NLS_CHARACTERSET';
- PROPERTY_VALUE
- --------------------------------------------------------------------------------
- AL32UTF8
- SQL>
关于Oracle 数据库存储数学符号的描述,见如下的mos文章:
NEED TO STORE GREEK, MATH SYMBOLS (Doc ID 1060862.6)
下面全文转载该文章:
- Problem Description:
- ====================
- You would like to store extended Math symbols and the Greek letter Alpha in
- the database because your business application requires the presence of those
- symbols. You do not know which character set is on the database, but on the
- application your NLS_LANG is set to NLS_LANG=American_America.we8iso8859p1 or
- AMERICAN_AMERICA.WE8MSWIN1252.
- Solution Summary:
- =================
- Your database was created with the wrong character set. Recreate the database
- with the correct character set.
- Choice of correct character sets:
- EL8ISO8859P7
- UTF8
- Al32UTF8
- Solution Description:
- =====================
- To find which character set is on the database level, connect internal or as
- DBA and run the following query:
- SVRMGR> select * from nls_database_parameters;
- You probably do not have EL8ISO8859P7, UTF8 or the AL32UTF8 character set
- listed for the NLS_CHARACTERSET parameter.
- Other character sets do not contain Greek letters or extended Math symbols.
- The character set that does is EL8ISO8859P7 or a UNICODE as character set, see:
- Note:260893.1 Unicode character sets in the Oracle database
- Solution Explanation:
- =====================
- All character data in an Oracle database is stored using a single character
- encoding scheme (character set). The database encoding scheme does not have
- to be the same as that used by an application to access database data.
- Although, the character set on the database level determines the choice of
- characters that can be stored. The database character encoding scheme is
- specified when the database is created, before it contains any data, by the
- CREATE DATABASE statement. The client-side encoding scheme is specified by
- defining the NLS_LANG parameter for a session. Once CREATE'd, a database
- encoding scheme cannot be changed without re-creating the database.
关于在Oracle 数据库存储m³(立方米)
标签: