X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=debugger%2Fcommon.php;h=4026d6073d37dd5448fb0946fa8c9e5d2f96f8fa;hb=d8e180b0ca87bf675d5fda2099d49c9d0043cd42;hp=ecd09cf251c75c6b32f131695b4de46406f41294;hpb=da824472c0045c183f40792b8c760c11d024005d;p=plcapi.git diff --git a/debugger/common.php b/debugger/common.php index ecd09cf..4026d60 100644 --- a/debugger/common.php +++ b/debugger/common.php @@ -28,10 +28,11 @@ $preferredEncodings = 'UTF-8, ASCII, ISO-8859-1, UTF-7, EUC-JP, SJIS, eucJP-win, $inputcharset = mb_detect_encoding(urldecode($_SERVER['REQUEST_URI']), $preferredEncodings); if (isset($_GET['usepost']) && $_GET['usepost'] === 'true') { $_GET = $_POST; - /// @todo detect encoding, eg from from http headers? - // mb_detect_encoding(urldecode($_SERVER['...']), $preferredEncodings); + $inputcharset = mb_detect_encoding(implode('', $_GET), $preferredEncodings); } +/// @todo if $inputcharset is not UTF8, we should probably re-encode $_GET to make it UTF-8 + // recover input parameters $debug = false; $protocol = 0;