Tuesday, July 19, 2005

How to convert big-5 tables to Unicode tables

If a Table X in a database contains the following codes (other than ASCII):
1. Big-5
2. Encoded Unicode. Like 陈
Our goal is to convert the Big-5 ones to Unicode and leave the Encoded Unicode alone. As long as we can achieve this, we will be able to display Unicode from any country correctly from the Web Browser. As to how to convert the Encoded Unicode into "Internal" Unicode, we can use a one-shot VB program to convert, and we can discuss this later.
Step 1: Export X table to ANSI CSV Text file on a English Windows Platform.
Use DTS Import/Export Wizard.
Source is X table
Destination is a CSV Text file. ANSI encoding. First Row contains Field Name.
Step 2: Convert this Text file to Unicode.
Copy this file to a Big-5 Win2000 platform.
Open this file by NotePad.
Save As Unicode.
Copy this file back to the place ready to import to SQL server.
Step 3: Import this Unicode Text file to X table.
Use DTS Import/Export Wizard.
Source is this Text File
Destination is X Table (I suggest we backup the old first just in case).
Choose Delimited, Unicode, First Row contains Field Name.
Once imported. You can use the attached asp code to verify the correctness of the code. This simple unicode ASP file only display one field: KnownAs.
Database Application Test: Simplified + Traditional Chinese + Japanese + Korean
©P¤pµX
¥Ó¯À±ö
³¢­ì§Á
ªL±ê¶Ô
¤ý¦æ°·
±d»ï¤å
马畅
¤ýܦ­d
¤ý½U
©s¥çÚ|
­S¬üªÚ
°ª®Ú伟
刘华
§õµq
¸â¦i®p

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home