php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9749 ucwords() problem
Submitted: 2001-03-14 11:18 UTC Modified: 2001-03-14 11:50 UTC
From: jean-rene dot auger at rockdetente dot com Assigned:
Status: Closed Package: Strings related
PHP Version: 4.0.4pl1 OS: Windows NT Server 4.0
Private report: No CVE-ID: None
 [2001-03-14 11:18 UTC] jean-rene dot auger at rockdetente dot com
echo ucwords("c?line");

outputs:

C?Line

but should output:

C?line

The "?" (ascii 130) character is one of many accented characters considered valid alphabetical lettrs in the French language.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-03-14 11:33 UTC] hholzgra@php.net
can't reproduce this on unix

what kind of character set (and locale settings)
are you using?

in the ISO character set used by Windows and Unix
"?" should be 231 or 232, not 130

the range of 128-160 is undefined in the ISO 8859
character sets and might be treatet as a space
character by windows c-lib so that isspace() which
is used by ucwords returns true?
 [2001-03-14 11:47 UTC] sbergmann@php.net
<?php echo ucwords("c?line"); ?> outputs 

  C?line

on PHP 4.0.5-dev on Win32.

 [2001-03-14 11:50 UTC] hholzgra@php.net
? is 130 in the DOS character set

it works fine in ANSI/ISO8859

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Oct 12 04:01:27 2024 UTC