From: [EMAIL PROTECTED] Operating system: Win 2k PHP version: 4.1.2 PHP Bug Type: Scripting Engine problem Bug description: setlocale() corrupts all functions that depend on it: WDDX, strftime, ucwords
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 bug report at http://bugs.php.net/?id=16718&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=16718&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=16718&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=16718&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=16718&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=16718&r=support Expected behavior: http://bugs.php.net/fix.php?id=16718&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=16718&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=16718&r=submittedtwice