问题描述
目前,我们的数据库使用Win1252作为唯一的字符编码。我们将不得不在数据库表中支持Unicode,这意味着我们必须对四个数据库进行这种迁移,并在大部分24/7环境中运行大约80个Delphi应用程序。有关Delphi应用程序迁移到UTF-8(或UNICODE_FSS)的数据库的建议?下面列出的一些问题。非常感谢您的答案!
- 有工具有助于迁移现有数据库(大小在250 MB和2 GB之间,没有Blob字段),通过转储数据,使用UNICODE_FSS或UTF-8重新创建数据库,并加载数据?
- 是否有已知的问题与Delphi 2009,dbExpress和Interbase 7.5相关的Unicode字符集?
- 您是否建议先将数据库升级到 Interbase 2009 ? (此升级计划但没有高优先级)
- 我们可以简单地迁移数据库,Delphi会自动处理Unicode字符集,否则将不得不更改所有每个Datamodule中的字符字段类型(dfm和源代码)?
- 您将推荐哪种策略与< strong>平行移植正常开发和维护现有应用程序?应用程序在内部运行,所以开发和数据库管理在内部完成。
更新:来自InterBase讨论区主题: SQL Unicode字符类型失败(InterBase XE)
问题:空字符串字段上的UPDATE不再找到记录。如果UTF8字符为空,则DataSetProvider会为更新操作生成错误的SELECT。
症状:消息未被其他用户找到或编辑
解决方案:升级到Delphi 2010 Update 4或使用QC中描述的解决方法
Currently, our database uses Win1252 as the only character encoding. We will have to support Unicode in the database tables soon, which means we have to perform this migration for four databases and around 80 Delphi applications which run in-house in a 24/7 environment. Are there recommendations for database migrations to UTF-8 (or UNICODE_FSS) for Delphi applications? Some questions listed below. Many thanks in advance for your answers!
- are there tools which help with the migration of the existing databases (sizes between 250 MB and 2 GB, no Blob fields), by dumping the data, recreating the database with UNICODE_FSS or UTF-8, and loading the data back?
- are there known problems with Delphi 2009, dbExpress and Interbase 7.5 related to Unicode character sets?
- would you recommend to upgrade the databases to Interbase 2009 first? (This upgrade is planned but does not have a high priority)
- can we simply migrate the database and Delphi will handle the Unicode character sets automatically, or will we have to change all character field types in every Datamodule (dfm and source code) too?
- which strategy would you recommend to work on the migration in parallel with the normal development and maintenance of the existing application? The application runs in-house so development and database administration is done internally.
Update: From InterBase discussion forum thread: Unicode Databases in InterBase - Really? (it is not a thread by me but it shows that some problems still exist in InterBase XE).
Other related QC entries:
QC#94455 SQL Unicode Char Type Failure (InterBase XE)
Problem: UPDATE on a empty string field no longer finds a record. If a UTF8 character field is empty, the DataSetProvider generates a wrong SELECT for the update action.
Symptom: Message 'record not found or edited by another user'
Solution: upgrade to Delphi 2010 Update 4 or use the workaround described in QC
这篇关于Delphi dbExpress和Interbase:UTF8迁移步骤和风险?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!