Database Name | Example Database Server Encoding(s) | Example JDBC URL Format | WebObjects Default Encoding |
Oracle | JA16SJIS, Unicode (AL32UTF8) | jdbc:oracle:thin:@<SERVERNAME>:1521:<DBNAME> | MS932, UTF8 |
Sybase | sjis, utf8 | jdbc:sybase:Tds:<SERVERNAME>:11222/<DBNAME> | MS932 |
jdbc:sybase:Tds:<SERVERNAME>:11222/<DBNAME>?CHARSET=utf8&JCONNECT_VERSION=6 | UTF8 | ||
Microsoft SQL Server 2000 | Japanese (cp932) | jdbc:microsoft:sqlserver://<SERVERNAME>:1433; DatabaseName=<DBNAME> | MS932, UTF8 |
MySQL | Unicode | jdbc:mysql://<SERVERNAME>/<DBNAME>?useUnicode=true&characterEncoding=MS932 | MS932 |
jdbc:mysql://<SERVERNAME>/<DBNAME>?useUnicode=true&characterEncoding=UTF8 | UTF8 | ||
OpenBase | SHIFTJIS, Unicode UTF-8, Unicode Extended | jdbc:openbase://<SERVERNAME>/<DBNAME> | SJIS, UTF8 |
OpenLDAP | Unicode | ldap://<SERVERNAME>:389/<dn> | UTF8 |
Notes
1. Database Server Encoding:
Although Unicode or UTF is preferred for its portability, database server encoding tends to be selected by other system requirements or usage patterns. For example, if the database is only used in Japan, then Shift-JIS is probably the better choice. Typically, Japanese database servers are configured using "Shift-JIS" (and its variants such as "MS932"), Japanese EUC, UTF8, and UTF16.
2. WebObjects Default Encoding for Oracle, Sybase, Microsoft SQL Server 2000, MySQL:
If you use "MS 932" as the default encoding, you will be able to use the vendor's Japanese-specific character set. However, using "MS932" is limited to Japanese, while "UTF8" will cover a broad range of characters used in other languages.
See technical document 107667 for setting the browser's character encoding from a WebObjects application.
3. Database Adaptors and JDBC Drivers
For Mac OS X 10.2, Windows 2000, and WebObjects 5.2.1, see the Deploying Applications guide at:
http://developer.apple.com/documentation/WebObjects/Deployment/Deploying_Applications/Installation/chapter_3_section_4.html
Also see technical document 72598 on WebObjects Compatibility.
For Mac OS X 10.3, WebObjects 5.2.2, the following newer database versions and JDBC driver can be used, but they have not been officially qualified by Apple:
Important: Using the JDBC driver MySQL Connector/J 3.0 with OS X 10.3 allows you to use Japanese with the "text" external type. To avoid seeing garbled text with the "text" external type when using the older driver MySQL Connector/J 2.0, the JDBC URL must include the character encoding type "UTF8".
Example:
jdbc:mysql://<SERVERNAME>/<DBNAME>?useUnicode=true&characterEncoding=UTF8
Note: The MySQL Connector/J 3.0 does not work with Windows 2000.