public function isCollationSupportedForKeys($collation, $fieldLength)
    {
        $sm = $this->getSchemaManager();
        $existingTables = array_map('strtolower', $sm->listTableNames());
        for ($i = 0; ; ++$i) {
            $tableName = 'tmp_checkCollationFieldLength' . $i;
            if (!in_array(strtolower($tableName), $existingTables)) {
                break;
            }
        }
        $column = new DbalColumn('ColumnName', DbalType::getType(DbalType::STRING), ['length' => (int) $fieldLength]);
        $column->setPlatformOption('collation', (string) $collation);
        $table = new DbalTable($tableName, [$column]);
        $table->setPrimaryKey([$column->getName()]);
        try {
            $sm->createTable($table);
        } catch (Exception $x) {
            // SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is XYZ bytes
            return false;
        }
        try {
            $sm->dropTable($tableName);
        } catch (Exception $x) {
        }

        return true;
    }