/** * Gets the current internal encoding. * * @return string The encoding "name". * @throws EncodingDetectionException If the detection fails. */ public static function getInternalEncoding() { $encoding = iconv_get_encoding(static::ICONV_INTERNAL_ENCODING_FLAG); if (false === $encoding) { throw EncodingDetectionException::forCurrentSystem(); } return $encoding; }