public class CharsetTest extends BaseTestCase
BaseTestCase.MockConnectionConfiguration| Modifier and Type | Field and Description |
|---|---|
private static char[] |
CP932_CHARS
Test data of cp932.
|
static char[] |
EUCJPMS_CHARS
Test data of eucjpms.
|
static char[] |
SJIS_CHARS
Test data of sjis.
|
static char[] |
UJIS_CHARS
Test data of ujis.
|
conn, dbClass, dbName, dbUrl, isOpenSSL, mainConnectionUrl, pstmt, rs, serverVersion, stmt, timeZoneFreeDbUrl| Constructor and Description |
|---|
CharsetTest() |
| Modifier and Type | Method and Description |
|---|---|
private boolean |
bytesAreSame(byte[] byte1,
byte[] byte2) |
private java.lang.String |
getByteArrayString(byte[] ba) |
private java.util.Map<java.lang.String,java.lang.String> |
getCharacterSetsAndCollations() |
void |
testCharsetMapping()
Prints static mappings for analysis.
|
void |
testCharsets() |
void |
testCodePage1252() |
void |
testCollation41()
Tests if the driver configures character sets correctly for 4.1.x servers.
|
private void |
testConversionForString(java.lang.String charsetName,
java.sql.Connection convConn,
java.lang.String charsToTest) |
void |
testCP932Backport() |
void |
testCsc4194() |
private void |
testCsc4194InsertCheckBlob(java.sql.Connection c,
java.lang.String tableName) |
private void |
testCsc4194InsertCheckText(java.sql.Connection c,
java.lang.String tableName,
java.lang.String encoding) |
void |
testCSC5765() |
void |
testGB18030()
Test for the gb18030 character set
|
void |
testInsertCharStatement() |
void |
testLatin1Encoding()
Tests that 'latin1' character conversion works correctly.
|
void |
testNECExtendedCharsByEUCJPSolaris() |
void |
testNewCharsetsConfiguration()
These two charsets have different names depending on version of MySQL server.
|
void |
testNonStandardConnectionCollation()
Tests the ability to set the connection collation via properties.
|
void |
testSjis5c()
Tests that the 0x5c escaping works (we didn't use to have this).
|
void |
testUtf8Encoding()
Tests that UTF-8 character conversion works correctly.
|
void |
testUtf8Encoding2() |
appendRequiredProperties, assertByteArrayEquals, assertConnectionsHistory, assertEqualsFSAware, assertNonSecureConnection, assertResultSetLength, assertResultSetsEqual, assertSecureConnection, assertSecureConnection, assertSessionStatusEquals, assertThrows, assertThrows, assertThrows, assertThrows, cleanupTempFiles, createDatabase, createDatabase, createFunction, createFunction, createProcedure, createProcedure, createSchemaObject, createSchemaObject, createTable, createTable, createTable, createTable, createUser, createUser, createView, createView, currentTimeMillis, dropDatabase, dropDatabase, dropFunction, dropFunction, dropProcedure, dropProcedure, dropSchemaObject, dropSchemaObject, dropTable, dropTable, dropUser, dropUser, dropView, dropView, fillPrimitiveDefaults, getConnectionWithProps, getConnectionWithProps, getConnectionWithProps, getConnectionWithProps, getEncodedHostFromTestsuiteUrl, getEncodedHostPortPairFromTestsuiteUrl, getFailoverConnection, getFailoverConnection, getHostFreePropertiesFromTestsuiteUrl, getHostFreePropertiesFromTestsuiteUrl, getHostFromTestsuiteUrl, getInstanceNumber, getLoadBalancedConnection, getLoadBalancedConnection, getLoadBalancedConnection, getMysqlVariable, getMysqlVariable, getNewConnection, getNoDbUrl, getPort, getPortFreeHostname, getPortFromTestsuiteUrl, getPropertiesFromTestsuiteUrl, getPropertiesFromUrl, getRowCount, getSingleIndexedValueWithQuery, getSingleIndexedValueWithQuery, getSingleValue, getSingleValueWithQuery, getSourceReplicaReplicationConnection, getSourceReplicaReplicationConnection, getSourceReplicaUrl, getSourceReplicaUrl, getUnreliableFailoverConnection, getUnreliableFailoverConnection, getUnreliableLoadBalancedConnection, getUnreliableLoadBalancedConnection, getUnreliableMultiHostConnection, getUnreliableReplicationConnection, getUnreliableReplicationConnection, getUnreliableReplicationConnection, isClassAvailable, isCommunityEdition, isEnterpriseEdition, isMysqlRunningLocally, isRunningOnJRockit, isServerRunningOnWindows, isSysPropDefined, logDebug, newTempBinaryFile, randomString, removeHostRelatedProps, removeSqlMode, runLongTests, setUpBase, supportsLoadLocalInfile, supportsTestCachingSha2PasswordKeys, supportsTestCertificates, supportsTestSha256PasswordKeys, supportsTimeZoneNames, supportsTLSv1_2, tearDownBase, versionMeetsMinimum, versionMeetsMinimumpublic static final char[] SJIS_CHARS
private static final char[] CP932_CHARS
public static final char[] UJIS_CHARS
public static final char[] EUCJPMS_CHARS
@Test
public void testCP932Backport()
throws java.lang.Exception
java.lang.Exception@Test
public void testNECExtendedCharsByEUCJPSolaris()
throws java.lang.Exception
java.lang.Exception@Test
public void testInsertCharStatement()
throws java.lang.Exception
java.lang.Exception@Test
public void testCharsetMapping()
throws java.lang.Exception
java.lang.Exception@Test
public void testGB18030()
throws java.lang.Exception
java.lang.Exception@Test
public void testNonStandardConnectionCollation()
throws java.lang.Exception
java.lang.Exception@Test
public void testCharsets()
throws java.lang.Exception
java.lang.Exception@Test
public void testCollation41()
throws java.lang.Exception
java.lang.Exceptionprivate java.util.Map<java.lang.String,java.lang.String> getCharacterSetsAndCollations()
throws java.lang.Exception
java.lang.Exception@Test
public void testCSC5765()
throws java.lang.Exception
java.lang.Exception@Test
public void testNewCharsetsConfiguration()
throws java.lang.Exception
java.lang.Exception@Test
public void testLatin1Encoding()
throws java.lang.Exception
java.lang.Exception@Test
public void testSjis5c()
throws java.lang.Exception
java.lang.Exception@Test
public void testUtf8Encoding()
throws java.lang.Exception
java.lang.Exception@Test
public void testUtf8Encoding2()
throws java.lang.Exception
java.lang.Exceptionprivate boolean bytesAreSame(byte[] byte1,
byte[] byte2)
private void testConversionForString(java.lang.String charsetName,
java.sql.Connection convConn,
java.lang.String charsToTest)
throws java.lang.Exception
java.lang.Exception@Test
public void testCsc4194()
throws java.lang.Exception
java.lang.Exceptionprivate void testCsc4194InsertCheckBlob(java.sql.Connection c,
java.lang.String tableName)
throws java.lang.Exception
java.lang.Exceptionprivate void testCsc4194InsertCheckText(java.sql.Connection c,
java.lang.String tableName,
java.lang.String encoding)
throws java.lang.Exception
java.lang.Exceptionprivate java.lang.String getByteArrayString(byte[] ba)
@Test
public void testCodePage1252()
throws java.lang.Exception
java.lang.Exception