protected function getAcceptCharset() { $acceptCharset = empty($_SERVER['HTTP_ACCEPT_CHARSET']) ? null : $_SERVER['HTTP_ACCEPT_CHARSET']; if (!ctype_print($acceptCharset)) { $acceptCharset = null; } return $acceptCharset; }