UltraLite Database User's Guide
UltraLite Databases
Character sets in UltraLite
The character set of the UltraLite runtime library is different depending on the target operating system. The character set determines how the .
Single-byte Palm Computing Platform devices uses a character set based on code page 1252 (the Windows US code page). The 1252Latin1 code page is appropriate for developing applications for the Palm Computing Platform. The 1252Latin1 code page is the default Adaptive Server Anywhere collation sequence. Japanese Palm Computing Platform devices use 932JPN.
The Windows CE operating system uses Unicode. UltraLite running on Windows CE also uses Unicode to store CHAR(n) and VARCHAR(n) columns. Adaptive Server Anywhere collating sequences define behavior for 8-bit ASCII character sets.
UltraLite for Windows CE uses the Adaptive Server Anywhere collating sequence when comparing Unicode characters that have a corresponding 8-bit ASCII character in the collating sequence being used, allowing accented characters to compare equal and sort with unaccented characters. Unicode characters that have no corresponding 8-bit ASCII character use a comparison of two Unicode values.
The UltraLite components are all Unicode based.
The runtime library used by UltraLite embedded SQL and static C++ applications on Windows NT/2000/XP and Windows 98 is provided in both ANSI and UNICODE versions. UltraLite versions before version 9 included only an ANSI version of the runtime library.
The runtime or component that is used to create the database determines how characters are stored within the database. You cannot create an UltraLite database using an ANSI component or runtime library and then use that database file with a Unicode component or runtime library.
The following table lists the character set in use by UltraLite components and runtime libraries. These character sets dictate whether or not you can use a database file created by one version of UltraLite in another. In particular, note that you cannot open a database created by version 8.0.2 UltraLite for MobileVB or UltraLite ActiveX on a Windows operating system (other than Windows CE) in version 9.0 or later software.
Environment | 8.0.2 | 9.0 and later |
---|---|---|
Windows components | ANSI | Unicode |
Windows CE components | Unicode | Unicode |
Windows (Native UltraLite for Java) | Unicode | Unicode |
Windows CE (Native UltraLite for Java) | Unicode | Unicode |
Windows 8.0.2 DLL | ANSI | N/A |
Windows (ulrt.lib) | N/A | ANSI |
Windows (ulrtw.lib) | N/A | Unicode |
Windows (ulrtc.lib (engine)) | N/A | Unicode |
Windows CE | Unicode | Unicode |
The error-handling objects SQLException and SQLWarning provide the capability for Java applications to obtain error or warning messages. By default, these messages are supplied in English.
Localized error and warning messages may be obtained in a non-English language by setting the Java Locale to the appropriate language. For example, to obtain French messages, the following code fragment might be used:
java.util.Locale locale = new java.util.Locale( "fr", "" ); java.util.Locale.setDefault( locale );
The default Locale should be set at the start of the program. Once a message is placed in an error-handling object, the language to be used for the message is established for that execution of the program.