From:             john at jcoppens dot com
Operating system: Linux (2.6.14)
PHP version:      5.1.4
PHP Bug Type:     Regexps related
Bug description:  setlocale doesn't change behaviour of [:alpha:]

Description:
------------
Executing

  setlocale(LC_ALL, 'es_ES');          
  $str = "La nación es grande";
  $words = split("[^[:alpha:]']+", $str);

words in $str are not recognized as Spanish. For example,
'nación' is still split at the 'ó'.

setlocale returns es_ES indicating the locale was set.


Expected result:
----------------
The original text split into correct words. According to the
regexp docs, [:alpha:] should acquire the Spanish characters
if the locale is set.

Actual result:
--------------
Words are split at non-ASCII characters (éáí etc).


-- 
Edit bug report at http://bugs.php.net/?id=37791&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=37791&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=37791&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=37791&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=37791&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=37791&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=37791&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=37791&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=37791&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=37791&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=37791&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=37791&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=37791&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=37791&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=37791&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=37791&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=37791&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=37791&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=37791&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=37791&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=37791&r=mysqlcfg

Reply via email to