avoid skipping test when current locale is C
[m6w6/ext-http] / tests / urlparser004.phpt
index d1cd1eea061a1ac4f362b6e49d2dc8913bf1f5cd..9172138eeb971b7330ae7a401a047f37e2712cf5 100644 (file)
@@ -4,13 +4,14 @@ url parser multibyte/locale
 <?php
 include "skipif.inc";
 if (!defined("http\\Url::PARSE_MBLOC") or
 <?php
 include "skipif.inc";
 if (!defined("http\\Url::PARSE_MBLOC") or
-       !stristr(setlocale(LC_CTYPE, NULL), "utf")) {
+       !stristr(setlocale(LC_CTYPE, "C.UTF-8"), "utf")) {
        die("skip need http\\Url::PARSE_MBLOC support and LC_CTYPE=*.UTF-8");
 }
 ?>
 --FILE--
 <?php
 echo "Test\n";
        die("skip need http\\Url::PARSE_MBLOC support and LC_CTYPE=*.UTF-8");
 }
 ?>
 --FILE--
 <?php
 echo "Test\n";
+setlocale(LC_CTYPE, "C.UTF-8");
 
 $urls = array(
        "s\xc3\xa7heme:",
 
 $urls = array(
        "s\xc3\xa7heme:",