[转帖]字符集 AL32UTF8 和 UTF8
https://blog.51cto.com/comtv/383254#
文章标签职场休闲字符集 AL32UTF8 和 UTF8文章分类数据库阅读数1992
The difference between UTF8 and AL32UTF8 are:
UTF8 stores Unicode characters with code points > U+FFFF as two surrogate characters, three bytes each
AL32UTF8 stores Unicode characters with code points > U+FFFF as one four-byte character
UTF8 will not be updated anymore when new Unicode versions are released, only AL32UTF8 and AL16UTF16 will.
Due to compatibility problems with pre-9i versions use UTF8 if you have Oracle8i clients connecting to the database. Use AL32UTF8 in pure Oracle9i environment.
UTF-8 encoding is variable-width. In UTF-8, each character can be represented by either one, two, or three bytes.
UTF8 is a varying width 1-3 bytes per character Unicode encoding. It is supported for both database and national character sets. It is a binary superset of US7ASCII. UTF8 corresponds to Unicode CESU-8 encoding.
AL32UTF8 is a varying width 1-4 bytes per character. It is supported for CHAR, VARCHAR2, LONG and CLOB only (database character set). It is a binary superset of UTF8 (in 9.2 only) and US7ASCII. AL32UTF8 corresponds to Unicode UTF-8 encoding.
This is what Metalink says. In Note: 237593.1
There is a possible problem for 817 and lower versions: Problems connecting to AL32UTF8 databases from older versions 8i and lower.
The default UTF8 characterset for 9i/10G is AL32UTF8, however this characterset is NOT recognised by any pre-9i clients/server systems.
Oracle recommends that you use UTF8 instead of AL32UTF8 as database characterset if you have 8i (or older) servers and clients connecting to the 9i/10g system until you can upgrade the older versions.
UTF8 is unicode revision 3.0 in 8.1.7 and up. AL32UTF8 is Unicode 3.0 in 9.0.1, Unicode 3.1 in 9.2, Unicode 3.2 in 10.1 and Unicode 4.01 in 10.2
Besides the difference in Unicode version the "big difference" is that AL32UTF8 has build in support for "Surrogate Pairs" (also known as Surrogate characters or "Supplementary characters").
Practically this means that in 99% of the cases you can use UTF8 instead of AL32UTF8 without any problem.
There are only a few situations where Surrogate Pairs are already used on client side. Windows system with HKSCS2001 (hong kong extension) is one of those. Note that you actually can *store* Surrogate Pairs in UTF8 but will store 2 * 3 byte characters and not like AL32UTF8 one 4 byte character.
Note that if you now use UTF8 as database characterset and -in the future you do a roll out of new 9i or higher clients and all your other databases are upgraded to 9i or higher, you can simply do a alter database characterset to go from UTF8 to AL32UTF8 so downtime will be limited to a few minutes if the need to go to AL32UTF8 should arise. There is no performance impact on staying on UTF8
NOTE:
This note is ONLY relevant if you have already a 9i AL32UTF8 database with data in. If you still need to create the 9i system then choose UTF8 instead of AL32UTF8 as database characterset in the database creation assistant.
So, *IF* you have already a 9i system running with AL32UTF8 then you can use the following steps in this note to change the database characterset to UTF8 without losing data.
You can't simply use "ALTER DATABASE CHARACTERSET" to go from AL32UTF8 to UTF8 because UTF8 is a SUB-set of AL32UTF8 (some codepoints which are correct in AL32UTF8 are not known in UTF8)
But again, UTF8 *contains* all characters know in AL32UTF8, the difference between them is pure the way some characters are stored (AL32UTF8 is a bit more efficient for some characters)
So you will run into ORA-12712 if you try alter database.....
source:http://space.itpub.net/160455/viewspace-499942
[转帖]字符集 AL32UTF8 和 UTF8的更多相关文章
- oracle 字符集 AL32UTF8、UTF8
简介:ORACLE数据库字符集,即Oracle全球化支持(Globalization Support),或即国家语言支持(NLS)其作用是用本国语言和格式来存储.处理和检索数据.利用全球化支持,ORA ...
- AL32UTF8 and UTF8 and ZHS16GBK
About AL32UTF8 ORACLE数据库字符集,即Oracle全球化支持(Globalization Support), 或即国家语言支持(NLS)其作用是用本国语言和格式来存储.处理和检索数 ...
- Oracle11g字符集AL32UTF8修改为ZHS16GBK详解
此问题发生在数据库迁移过程中.源数据库:自己笔记本上win7 64位系统的oracle11g个人版,字符集ZHS16GBK :目标数据库,HP的sqlserver2008 系统 64位数据库服务器,字 ...
- Oracle11g字符集AL32UTF8修改为ZHS16GBK详解【转】
------感谢作者,确实解决了问题.分享下,希望帮到更多人 此问题发生在数据库迁移过程中.源数据库:自己笔记本上win7 64位系统的oracle11g个人版,字符集ZHS16GBK :目标数据库, ...
- Oracle 11g修改字符集AL32UTF8为ZHS16GBK
oracle11g更改字符集AL32UTF8为ZHS16GBK当初安装oracle的时候选择的默认安装,结果字符集不是以前经常用的16GBK,要改字符集,从网上找到了方法并试了一下,果然好用! 具体如 ...
- MySQL 解决 emoji表情 的方法,使用utf8mb4 字符集(4字节 UTF-8 Unicode 编码)
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px 'Helvetica Neue'; color: #454545} span.s1 {font: ...
- Oracle 12C 新特性之 db默认字符集AL32UTF8、PDB支持不同字符集
一. db默认字符集AL32UTF8Specify the database character set when you create the database. Starting from Ora ...
- (原创)Linux下MySQL 5.5/5.6的修改字符集编码为UTF8(彻底解决中文乱码问题)
« CloudStack+XenServer详细部署方案(10):高级网络功能应用 (总结)CentOS Linux 5.x在GPT分区不能引导的解决方法 » 2013-1 11 (原创)Linux下 ...
- mac 设置 MySQL 数据库默认编码(字符集)为 UTF-8
mac 设置 MySQL 数据库默认编码(字符集)为 UTF-8 原文链接:https://juejin.im/post/5bbdca76e51d45021147de44 鉴于有些刚接触 MySQ ...
- centos6.5和centos7.5统一字符集为zh_CN.UTF-8解决系统和MySQL数据库乱码问题
linux的服务器需要做的操作 centos6.5下: 修改默认字符集为 zh_CN.UTF-8,如果没有中文语言包可能需要安装中文语言包支持 [root@meinv01 ~]# yum groupi ...
随机推荐
- 新报: 根据IP获取物理地址不需要调用接口啦
一. 复制data文件夹到自己的项目当中 可以进行加载到这个文件即可 博主放入在项目的根目录当中 请移步Gitee pull 该文件 https://gitee.com/yangbuyi/ip_fil ...
- 技本功|数据安全之IDC数据容灾设计实现
近年来,数据安全问题日渐受到大家的关注,对于任何一家企业,数据无疑是最重要的资产之一.提到数据容灾,大家可能会想到备库和备份的概念,那么我们先来谈谈备库与备份的区别. 备库与备份的区别 通常来讲,备库 ...
- IBM DS5020存储更换硬盘操作
前期准备:笔记本.网线 连接存储控制器操作,在笔记本上安装DS Storage Manager 11 Client,然后在笔记本IP设备为192.168.128.X(A控制器管理口1和2的管理IP地址 ...
- zabbix常用监控项
https://blog.csdn.net/xkjcf/article/details/78559273?locationNum=10&fps=1 agent.ping #agent是否在线 ...
- QRCoder1.4.3生成二维码,不依赖System.Drawing,解决"未能找到类型或命名空间名QRCode","及ImageFormatPng仅在windows上受支持"
生成二维码1(简单) 包引用: <PackageReference Include="QRCoder" Version="1.4.3" /> usi ...
- 轻量化动态编译库 Natasha v8.0 正式发布!
.NET8.0 与 动态编译 Hello 各位小伙伴,我于 2024年1月10日 发布了 Natasha 一个全新的里程碑版本 v8.0,对于老用户而言,此次发布版本号跨度较大,是因为我决定使用新的版 ...
- Programming abstractions in C阅读笔记:p184-p195
<Programming Abstractions In C>学习第61天,p184-p195总结. 一.技术总结 1.mutual recursion 2.natural number ...
- GaussDB(DWS)集群中寻找节点CPU占用高的语句
摘要:本文主要通过实例讲解如何通过gs_cpuwatcher.sh 脚本寻找CPU占用高语句. 本文分享自华为云社区<GaussDB(DWS) gs_cpuwatcher.sh 脚本如何寻找CP ...
- 华为云MVP程云:知识化转型,最终要赋能一线
摘要:如今的智能语音助手,可以帮助我们完成日常生活中的一些常规动作.同样,在企业中,智能问答机器人也在扮演着同样的角色. 本文分享自华为云社区<[亿码当先,云聚金陵]华为云MVP程云:知识化转型 ...
- 云小课|三大灵魂拷问GaussDB(DWS)数据落盘安全问题
阅识风云是华为云信息大咖,擅长将复杂信息多元化呈现,其出品的一张图(云图说).深入浅出的博文(云小课)或短视频(云视厅)总有一款能让您快速上手华为云.更多精彩内容请单击此处. 摘要:GaussDB(D ...