static function getEncoding() { // Get the current locale (expecting the filesystem is in the same locale, as the standard says) return ext_TextEncoding::parseCharset(setlocale(LC_CTYPE, 0)); }