From:             [EMAIL PROTECTED]
Operating system: Windows XP Pro (spanish)
PHP version:      4.1.0
PHP Bug Type:     Strings related
Bug description:  ucwords failing randomly with international characters

When using the ucwords() function with strings containing international
characters, the function will return incorrect values. The return value
will be different every time the function is called.

I've seen bogus bug reports for this function so we have a slight chance
for this to be yet another bogus bug, but look at this:

echo setlocale(LC_ALL, "0");
Output:
LC_COLLATE=C;LC_CTYPE=Spanish_Argentina.1252;LC_MONETARY=C;LC_NUMERIC=C;LC_TIME=C

---
echo ucwords('ñáéíóúàèìòùäëïöü');
Output:
ÑáéíóúÀèìÒùäËïÖü
Output again (refresh button on browser):
ÑáÉíóúàèìòùäëïöÜ
Output again:
ÑáéíÓúàèìÒùäëïöÜ

etc. etc.

Now, if I do setlocale(LC_ALL, "spanish"), the restult is still the same.

I've noted that the problem is not the intl. char, but the char after that.
This is, ucwords("cañas") will return "Cañas" or "CañAs", randomly.

Scenario:
Windows XP Pro (spanish)
Apache 1.3.22
PHP 4.1.0

-- 
Edit bug report at: http://bugs.php.net/?id=14655&edit=1


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to