$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;