Translate a non UTF Database into UTF8
Posted: Mon 21 Sep 2009 08:39
Hi everyone,
Having switched from D6 to D2009 so now all string are unicode, I have a legacy Firebird DB in char set none given I have nearly completed the code changes and I would like to upgrade the database in full UTF8 for all string fields (we use a combination of Greek, French and English names.....)
I know how to rewrite the entire database with empty data in SQL
but what about data transfer
1) Do I have to write code with 2 connections and translate each records
via
DatasetUTF.insert
DatasetUTF[field1].asstring := Dataset[field1].asstring ;
DatasetUTF.post
2) or via
SQL insert
parameter('pname').aswidestring = Dataset[field1].asstring
3) Or any other methods backup/ restore
4) Or other unknown simpler methods ?????
I am sure others have been faced with the same issue.....
Thanks
Philippe Watel
Having switched from D6 to D2009 so now all string are unicode, I have a legacy Firebird DB in char set none given I have nearly completed the code changes and I would like to upgrade the database in full UTF8 for all string fields (we use a combination of Greek, French and English names.....)
I know how to rewrite the entire database with empty data in SQL
but what about data transfer
1) Do I have to write code with 2 connections and translate each records
via
DatasetUTF.insert
DatasetUTF[field1].asstring := Dataset[field1].asstring ;
DatasetUTF.post
2) or via
SQL insert
parameter('pname').aswidestring = Dataset[field1].asstring
3) Or any other methods backup/ restore
4) Or other unknown simpler methods ?????
I am sure others have been faced with the same issue.....
Thanks
Philippe Watel