note 41724 added to function.mb-detect-order

From: Date: Wed, 21 Apr 2004 00:31:34 +0000
Subject: note 41724 added to function.mb-detect-order
Groups: php.notes 
Request: Send a blank email to php-notes+get-68398@lists.php.net to get a copy of this message
Note that as of mbstring.c version 1.142.2.31, first released as PHP 4.3.4RC3, "auto" has changed meaning. It used to be configured based on #defines, so it was set at compile time, so for precompiled binary users (esp. Windows users) it has always been the same (Japanese mode). However, it is now based on the language that mbstring is configured for at runtime. (setlocale() doesn't affect this though) Running on English Windows at least, mbstring defaults to a "neutral" mode which results in an "auto" list of "ASCII, UTF-8". So, the point is, for PHP 4.3.4 or newer, you probably want to either use mb_language("Japanese") followed by mb_detect_order("auto"), or just hardcode your detect order with mb_detect_order("ASCII, JIS, UTF-8, EUC-JP, SJIS"). (Also note that mb_language() alone won't do it, you'll have to set the detect order to "auto" _after_ calling mb_language().) ---- Manual Page -- http://www.php.net/manual/en/function.mb-detect-order.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+41724 Delete -- http://master.php.net/manage/user-notes.php?action=delete+41724&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+41724&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#68398) next »