Please pay more attention to the character set of your database

简介: Recently, the vendors tried to install their systems in our office. Only had the vendors experience on Chinese platform.

    Recently, the vendors tried to install their systems in our office. Only had the vendors experience on Chinese platform. Their Windows is Chinese version. Their database is Chinese version. At level of Windows, Microsoft provided excellent solution: regional setting to support Chinese softwares, but for the database, we need to pay 120% attention to the character set of datbase. Actually this is what I learned from the problems I faced.

    Last week, both the vendors and I did not realize that the character set of database could be an issue, when I raised the request to create the database. I did not mention to the DBAs that we need a Chinese character set, therefore the DBAs created a database with UTF8 character set, which also support Chinese. When I found the character set is UTF8, I did not realize it could be a problem for pure Chinese softwares. When the vendors went to our office to install their softwares on our servers, we found a problem: the character sets are different, therefore the vendors could not restore their database into our server. Till then, we only thought about this could be resolved by a conversion during the restoring. By google and baidu, we did not find useful information, therefore we thought about a different way to import their database(including schema and data) into our server. We found that the tool “PL/SQL developer” has a function to export schema and data to sql script. After generating the scripts, we ran the schema script to create schema. Things seemed fine. When we tried to run the script of data, there was an error saying the size of a column is less than the size of data. We felt very strange on the error message, because we just generated the schema script and data script from the vendor’s database. How could the size of the column not fit the data? By thinking of the reasons, I suddenly call back a parameter the DBAs told me: the database is in UTF8 character set! A Chinese character in UTF8 code occupies 3 bytes, but A Chinese character in ZHS16GBK only needs 2 bytes. That is why the column could not store the data.

   Finally the vendors and I came to the same conclusion: we had to change the character set of our database. After changing the character set, we then proceed installation.

   Record key thing here: The UTF8 code is looking like this: AMERICAN_AMERICA.UTF8.    The Chinese GBK code is : Simplified Chinese_China.ZHS16GBK.

For playing back when I forgot it.

目录
相关文章
|
2月前
|
Windows
网页制作- Code Page,Character Set,语种对应列表
网页制作- Code Page,Character Set,语种对应列表
|
6月前
|
容器
How to set the Undo_tablespace in PDB in Physical Standby RAC Database. (Doc ID 2726173.1)
How to set the Undo_tablespace in PDB in Physical Standby RAC Database. (Doc ID 2726173.1)
54 1
|
6月前
|
消息中间件 Oracle 关系型数据库
实时计算 Flink版操作报错合集之报错io.debezium.DebeziumException: The db history topic or its content is fully or partially missing. Please check database history topic configuration and re-execute the snapshot. 是什么原因
在使用实时计算Flink版过程中,可能会遇到各种错误,了解这些错误的原因及解决方法对于高效排错至关重要。针对具体问题,查看Flink的日志是关键,它们通常会提供更详细的错误信息和堆栈跟踪,有助于定位问题。此外,Flink社区文档和官方论坛也是寻求帮助的好去处。以下是一些常见的操作报错及其可能的原因与解决策略。
324 0
|
6月前
|
开发工具 git
If you are using the git profile, you need to set a Git URI in your configuration. If you are using
If you are using the git profile, you need to set a Git URI in your configuration. If you are using
138 0
|
6月前
|
数据采集 SQL DataWorks
DataWorks操作报错合集之在DataWorks中出现"Please submit specific code instead of only 'set' or 'use'"这样的异常提示,该怎么处理
DataWorks是阿里云提供的一站式大数据开发与治理平台,支持数据集成、数据开发、数据服务、数据质量管理、数据安全管理等全流程数据处理。在使用DataWorks过程中,可能会遇到各种操作报错。以下是一些常见的报错情况及其可能的原因和解决方法。
119 0
|
6月前
|
API Python Windows
[已解决] openai.error.AuthenticationError: No API key provided. You can set your API key in code using
[已解决] openai.error.AuthenticationError: No API key provided. You can set your API key in code using
403 0
|
Java Nacos 开发者
Nacos无法启动详解:Please set the JAVA_HOME variable in your environment, We need java(x64) jdk8 or later
Nacos无法启动详解:Please set the JAVA_HOME variable in your environment, We need java(x64) jdk8 or later
2953 1
|
关系型数据库 MySQL 数据库
【报错】DVWA遇到Could not connect to the database service. Please check the config file. Database Error
【报错】DVWA遇到Could not connect to the database service. Please check the config file. Database Error
1151 0
|
JavaScript 前端开发
.bezierEasingMixin(); ^ Inline JavaScript is not enabled. Is it set in your op..
.bezierEasingMixin(); ^ Inline JavaScript is not enabled. Is it set in your op..
206 0
|
存储 前端开发 Java
【Java】If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
【Java】If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
399 0