protected function addConnectionCharset(array &$existingParameters, $connectionCharset)
    {
        $sanitizedCharset = trim(strtolower((string) $connectionCharset));

        if (!empty($sanitizedCharset)) {
            $existingParameters['charset'] = $sanitizedCharset;
        }
    }