Table 2-4 lists the Sybase character sets that are supported by jConnect. The table also lists the corresponding JDK byte converter for each supported character set.
Although jConnect supports UCS-2, currently no Sybase databases or Open Servers support UCS-2.
Adaptive Server versions 12.5 and later support a version of Unicode known as the UTF-16 encoding.
SybCharset name |
JDK byte converter |
---|---|
ascii_7 |
ASCII |
big5 |
Big5 |
big5hk (for JDK 1.3 and above) |
Big5_HKSCS |
cp037 |
Cp037 |
cp437 |
Cp437 |
cp500 |
Cp500 |
cp850 |
Cp850 |
cp852 |
Cp852 |
cp855 |
Cp855 |
cp857 |
Cp857 |
cp860 |
Cp860 |
cp863 |
Cp863 |
cp864 |
Cp864 |
cp866 |
Cp866 |
cp869 |
Cp869 |
cp874 |
Cp874 |
cp932 |
MS932 |
cp936 |
GBK |
cp949 |
Cp949 |
cp950 |
Cp950 |
cp1250 |
Cp1250 |
cp1251 |
Cp1251 |
cp1252 |
Cp1252 |
cp1253 |
Cp1253 |
cp1254 |
Cp1254 |
cp1255 |
Cp1255 |
cp1256 |
Cp1256 |
cp1257 |
Cp1257 |
cp1258 |
Cp1258 |
deckanji |
EUC_JP |
eucgb |
EUC_CN |
eucjis |
EUC_JP |
eucksc |
EUC_KR |
gb18030 |
GB18030 |
ibm420 |
Cp420 |
ibm918 |
Cp918 |
iso_1 |
ISO8859_1 |
iso88592 |
ISO8859-2 |
is088595 |
ISO8859_5 |
iso88596 |
ISO8859_6 |
iso88597 |
ISO8859_7 |
iso88598 |
ISO8859_8 |
iso88599 |
ISO8859_9 |
iso15 |
ISO8859_15_FDIS |
koi8 |
KOI8_R |
mac |
MacRoman |
mac_cyr |
MacCyrillic |
mac_ee |
MacCentralEurope |
macgreek |
MacGreek |
macturk |
MacTurkish |
sjis |
MS932 |
tis620 |
MS874 |
ucs2 |
Unicode |
utf8 |
UTF8 |
The following Sybase character sets are not supported in jConnect because no JDK byte converters are analogous to the Sybase character sets:
cp1047
euccns
greek8
roman8
roman9
turkish8
You can use these character sets with the TruncationConverter class as long as the application uses only the 7-bit ASCII subsets of these characters.
Use the JAVA_CHARSET_MAPPING connection property to supersede the default Adaptive Server character set mapping.
Example 1 Maps the server character set cp949 to ms949:
props.put("CHARSET", "cp949"); /* Server character set */ props.put("JAVA_CHARSET_MAPPING", "ms949"); /* Java character set mapping */
Most of the Adaptive Server character sets have the same name as the Java character sets that they are mapped to. See Table 2-4 for those character sets that are mapped to a Java character set with a different name.