|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-04-02 10:13 UTC] FrancS at seznam dot cz
[2009-04-13 17:58 UTC] jani@php.net
[2009-04-14 08:25 UTC] FrancS at seznam dot cz
[2009-04-21 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 09 10:00:01 2025 UTC |
Description: ------------ Hi, today I discover a problem with mb function mb_detect_encoding(). I have a string "chrany" in czech language. It seems that this function everytime return UTF-8 encoding, even if I load the text from a file with encoding "windows-1250" or "ISO-8859-2". Reproduce code: --------------- // test.txt is text file with charset "windows-1250" or "ISO-8859-2" $string = file_get_contents('test.txt'); var_dump(mb_detect_encoding($string, mb_list_encodings(), true)); Expected result: ---------------- SJIS Actual result: -------------- utf-8