You can convert ANSI databases containing multiple‑byte characters to Unicode.
When converting ANSI databases to Unicode, the shared memory or Hybrid Pipe Shared Memory (HPSM) transport type cannot be used; TCP/IP must be used.
Use the codepage command line argument of the JadeConvertDb application to specify the numeric value representing the appropriate codepage (for example, the Chinese PRC codepage is numerically 936).
All fixed-length strings or String Large Objects (slobs) are converted, based on the selected codepage. For more details, see "Running the User Database Conversion Application Example".
Converting a multiple‑byte character user database from ANSI to Unicode has the following implications.
A slob can get smaller; that is, a pair of JADE ANSI characters can be a single-language character (that is, a multiple‑byte), which converts to a single wide Unicode character.
A string or a slob can have characters that cannot be translated. For example, the single-byte © copyright character can be entered in a codepage "English (New Zealand)", which is invalid when the conversion specifies codepage=936.
The conversion handles the fixing of slob lengths in parent objects and the reporting of any translation failures.
When converting a multiple‑byte ANSI database to Unicode, consider the following.
Both the ANSI and Unicode binaries and databases must have the same level of binaries and hot fixes applied. This includes the system database *.bin files.
To convert an ANSI database to Unicode:
Start a database server for the ANSI database; for example:
F:\Jade\a_bin\jadrap.exe ini=F:\Jade\a_jade.ini path=F:\Jade\a_system
Start a Unicode jadclient program; for example:
F:\Jade\u_bin\jadclient.exe ini=F:\Jade\u_jade.ini path=F:\Jade\a_system server=multiUser schema=TestUserSchema app=JadeConvertDb startAppParameters defaultPath=F:\Jade\u_system existing=true codepage=936 userSchema=true userData=true
In these examples, a_bin/a_system/a_jade.ini represents the ANSI side and u_bin/u_system/u_jade.ini represents the Unicode side.
If you want to extract your application schemas from ANSI and load them into Unicode before you run the JadeConvertDb application from the jadclient program, set the userSchema argument to false.
After you have converted your multiple-byte ANSI database to Unicode, check for reported errors. Your jommsgn.log file can contain the following message (the class number may vary). Although this is a known warning message that can be ignored, you should investigate the cause of any other messages carefully.
2014/10/10 15:07:25 00a8c-1420 JomLog: jdiConvertCollBlockFromRemoteFormat: invalid class: 322 2014/10/10 15:07:25 00a8c-1420 JomLog: getCollBlockBufferLength: invalid collection class: 322
If any translation errors occur, the copyfile.log in the logs directory can have output like that shown in the following example.
2014/03/25 22:16:12.828 00e88-1248 CvtDb: copyFile file=24 processing. 2014/03/25 22:16:12.843 00e88-1248 CvtDb: copyFile file=24 finished. 2014/03/25 22:16:12.859 00e88-1248 CvtDb: copyFile file=25 processing. 2014/03/25 22:16:12.859 00e88-1248 CvtDb: copyFile file=25 finished. 2014/03/25 22:16:12.875 00e88-1248 CvtDb: copyFile file=26 processing. 2014/03/25 22:16:13.187 00e88-1248 CvtDb: oid=[0.22.929.2.1:1] : 5706 (Untranslatable character) 2014/03/25 22:16:13.187 00e88-1248 CvtDb: oid=[0.36.929.2.1:1] : 5706 (Untranslatable character) 2014/03/25 22:16:13.187 00e88-1248 CvtDb: oid=[0.58.929.2.1:1] : 5706 (Untranslatable character) 2014/03/25 22:16:13.187 00e88-1248 CvtDb: oid=[0.97.929.2.1:1] : 5706 (Untranslatable character) 2014/03/25 22:16:13.203 00e88-1248 CvtDb: oid=[0.103.929.2.1:1] : 5706 (Untranslatable character) 2014/03/25 22:16:13.203 00e88-1248 CvtDb: oid=[0.169.929.2.1:1] : 5706 (Untranslatable character) 2014/03/25 22:16:13.234 00e88-1248 CvtDb: copyFile file=26 finished. 2014/03/25 22:16:13.296 00e88-1248 CvtDb: copyFile file=27 processing. 2014/03/25 22:16:13.312 00e88-1248 CvtDb: copyFile file=27 finished.
It is your responsibility to check this file and then deal with any conversion issues that are logged. If an untranslatable character is found, the output character is set to a question mark (?) symbol, which can happen for both fixed-length strings and slobs. For example, you can create a Workspace in the JADE development environment with '1280.1'.asOid.inspect; and check all of the string fields in the object for unanticipated question mark symbols. (The oid to use is specified in the copyfile.log file.)
The character conversion depends on the code page selected for the conversion. The display of accented characters depends on the locale and font used.
Although the data can be converted in the Unicode system, we recommend that you fix the ANSI source database and then run the database conversion again.