Bug #16718 Updated: setlocale() corrupts all functions that depend on it: WDDX, strftime, ucwords

From: Date: Mon, 17 Jun 2002 11:40:41 +0000
Subject: Bug #16718 Updated: setlocale() corrupts all functions that depend on it: WDDX, strftime, ucwords
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-10848@lists.php.net to get a copy of this message
ID: 16718 Updated by: hholzgra@php.net Reported By: bs_php@infeer.com -Status: Open +Status: Analyzed Bug Type: Scripting Engine problem Operating System: Win 2k PHP Version: 4.1.2 -Assigned To: +Assigned To: hholzgra New Comment: looks like another setlocale/ZTS issue :( Previous Comments: ------------------------------------------------------------------------ [2002-05-16 08:47:48] cris@tellme.net if you want to resolve this problem change all mssql querys with odbc querys and all will be ok.......................i tryed this and it works.....:):):):) bye ------------------------------------------------------------------------ [2002-04-21 06:48:54] bs_php@infeer.com Just managed to get WDDX to run again, but it's rather a coincidence. I was playing around with the setlocale parameters and calling setlocale(LC_ALL,"ge"); Call the script 2x (twice!) and WDDX worked! Immediately commented the setlocale() out after and don't us it on win2k!!! <?php echo setlocale(LC_ALL,"ge"); $in = "ÄÖÜäöü"; $ser = wddx_serialize_value($in); $des = wddx_deserialize($ser); echo "<pre>"; echo htmlspecialchars($ser) . "\n"; var_dump($des); echo "</pre>"; ?> ------------------------------------------------------------------------ [2002-04-21 06:18:07] bs_php@infeer.com Hi First a list of all bug repports that I've found that I think are all caused be the setlocale() function: Note that some assume the bug in WDDX, strftime or ucword but it's acctually the setlocale() that causes it. Bug List: - - - - - WDDX: "german characters cannot be stored" Status:OPEN http://bugs.php.net/bug.php?id=15800 ucwords(): "ucwords failing randomly with international characters" Status:OPEN http://bugs.php.net/bug.php?id=14655 strftime(): "xml in zlib.xml does not use CDATA for code" " Status:BOGUS http://bugs.php.net/bug.php?id=14180 mssql_fetch_array(): "French special characters" Status:BOGUS (Not sure about this one) http://bugs.php.net/bug.php?id=16151 setlocale(): "Does it exist some way how to sort Czech texts inside arrays" Status:CLOSED http://bugs.php.net/bug.php?id=10749 Intressting is that bug #14655 and my comment in bug #15800 that it's something random. I'm adding my bug comment from bug #15800 below: > It's very inconsisten! > At first I wasn't using setlocale() and all seamed fine. > But after I called setlocale() the wddx serialize failed all the time! > > Multiple calls of setlocale() produce 2 different results that alternate. > After every Apache restart the results changes sort of randomly! > If setlocale() is commented out, the the last result remains(even after apache is restarted). > > It seams as if setlocale() is writting something wrong to the apache conf. > Reboot didn't help, my wddx serializetion is mucked up now! :( > Don't use it on Win2000!!! Following code was used to test : <?php // setlocale(LC_ALL,"german"); // Commented out at first $in = "ÄÖÜäöü"; $ser = wddx_serialize_value($in); $des = wddx_deserialize($ser); echo "<pre>"; echo htmlspecialchars($ser) . "\n"; var_dump($des); echo "</pre>"; ?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=16718&edit=1

« previous php.bugs (#10848) next »