xref: /PHP-8.4/ext/fileinfo/tests/bug74170.phpt (revision 60189aa9)
1--TEST--
2Bug #74170 locale information change after mime_content_type
3--EXTENSIONS--
4fileinfo
5intl
6--SKIPIF--
7<?php
8if (setlocale(LC_ALL, 'invalid') === 'invalid') { die('skip setlocale() is broken /w musl'); }
9if (setlocale(LC_CTYPE, 'ru_RU.koi8r') === false)
10    die('skip ru_RU.koi8r locale is not available');
11?>
12--FILE--
13<?php
14var_dump(setlocale(LC_CTYPE, 'ru_RU.koi8r'));
15var_dump(nl_langinfo(CODESET));
16var_dump(mime_content_type(__DIR__ . '/resources/test.ppt'));
17var_dump(nl_langinfo(CODESET));
18?>
19--EXPECT--
20string(11) "ru_RU.koi8r"
21string(6) "KOI8-R"
22string(29) "application/vnd.ms-powerpoint"
23string(6) "KOI8-R"
24