|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mysql.jdbc.CharsetMapping
public class CharsetMapping
Mapping between MySQL charset names and Java charset names. I've investigated placing these in a .properties file, but unfortunately under most appservers this complicates configuration because the security policy needs to be changed by the user to allow the driver to read them :(
Field Summary | |
---|---|
static java.lang.String[] |
INDEX_TO_CHARSET
Map of MySQL-4.1 charset indexes to Java encoding names |
static java.lang.String[] |
INDEX_TO_COLLATION
Map of MySQL-4.1 collation index to collation names |
static int |
MAP_SIZE
Size of static maps INDEX_TO_JAVA_CHARSET, INDEX_TO_MYSQL_CHARSET, INDEX_TO_COLLATION |
static java.util.Map<java.lang.String,java.lang.String> |
MYSQL_TO_JAVA_CHARSET_MAP
|
static java.util.Map<java.lang.String,java.lang.Integer> |
STATIC_4_0_CHARSET_TO_NUM_BYTES_MAP
Map of MySQL-4.0 charset names to mblen |
static java.util.Map<java.lang.String,java.lang.Integer> |
STATIC_CHARSET_TO_NUM_BYTES_MAP
Map of MySQL-4.1 charset names to mblen |
static java.util.Map<java.lang.Integer,java.lang.String> |
STATIC_INDEX_TO_MYSQL_CHARSET_MAP
Map of MySQL-4.1 collation indexes to MySQL encoding names |
Constructor Summary | |
---|---|
CharsetMapping()
|
Method Summary | |
---|---|
(package private) static java.lang.String |
getCharacterEncodingForErrorMessages(ConnectionImpl conn)
Returns the character encoding for error messages returned from the server. |
static int |
getCharsetIndexForMysqlEncodingName(java.lang.String name)
|
static java.lang.String |
getMysqlEncodingForJavaEncoding(java.lang.String javaEncodingUC,
Connection conn)
|
(package private) static int |
getNumberOfCharsetsConfigured()
|
(package private) static boolean |
isAliasForSjis(java.lang.String encoding)
|
(package private) static boolean |
isMultibyteCharset(java.lang.String javaEncodingName)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String[] INDEX_TO_CHARSET
public static final java.lang.String[] INDEX_TO_COLLATION
public static final int MAP_SIZE
public static final java.util.Map<java.lang.Integer,java.lang.String> STATIC_INDEX_TO_MYSQL_CHARSET_MAP
public static final java.util.Map<java.lang.String,java.lang.Integer> STATIC_CHARSET_TO_NUM_BYTES_MAP
public static final java.util.Map<java.lang.String,java.lang.Integer> STATIC_4_0_CHARSET_TO_NUM_BYTES_MAP
public static final java.util.Map<java.lang.String,java.lang.String> MYSQL_TO_JAVA_CHARSET_MAP
Constructor Detail |
---|
public CharsetMapping()
Method Detail |
---|
public static final java.lang.String getMysqlEncodingForJavaEncoding(java.lang.String javaEncodingUC, Connection conn) throws java.sql.SQLException
java.sql.SQLException
static final int getNumberOfCharsetsConfigured()
static final java.lang.String getCharacterEncodingForErrorMessages(ConnectionImpl conn) throws java.sql.SQLException
conn
- the connection to the MySQL server
java.sql.SQLException
- if determination of the character encoding failsstatic final boolean isAliasForSjis(java.lang.String encoding)
static final boolean isMultibyteCharset(java.lang.String javaEncodingName)
public static int getCharsetIndexForMysqlEncodingName(java.lang.String name)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |