Unicode support
Razunter - August 31, 2009 - 22:52
| Project: | User-Selectable Roles |
| Version: | 6.x-1.4 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Bacteria Man |
| Status: | closed |
Jump to:
Description
Role label validation does not support Unicode characters
$pattern = "'(\w+)\|(\w+)'";should be
$pattern = "'(\pL+)\|(\pL+)'";
#1
Ah, good catch. I will role this into the next release. Thanks!
#2
This issue has been fixed and is part of the newest release. Thanks again for reporting it.
#3
Automatically closed -- issue fixed for 2 weeks with no activity.
#4
That is very interesting !
I am getting the exact opposite result !
I'm using version 6.x-1.4 on a Drupal 6.14 installation and when I enable "Allow user-selectable roles" I am getting this error :
warning: preg_match() [function.preg-match]: Compilation failed: support for \P, \p, and \X has not been compiled at offset 2 in /home/admin/strippers.ro/sites/all/modules/user_selectable_roles/user_selectable_roles.module on line 118.Please enter lowercase singular/plural role labels delimited with a vertical bar (|).
If I go and change
$pattern = "'(\pL+)\|(\pL+)'";to
$pattern = "'(\w+)\|(\w+)'";on line 117 in user_selectable_roles.module, then it works with no errors.
Any ideas ?
#5
What version of PHP are you using? Is this your own local server or a web host?
#6
Hi,
I am using PHP 5.2.6 and this is a VPS running Centos 5.3.
#7
I did some quick research regarding the above error and apparently it can be caused when the PCRE (Perl Compatible Regular Expressions) library is not compiled to support certain patterns (as the error message indicates.) In other words this appears to be a server-specific issue.
#8
Well, I guess I just have to leave it the way it works for me then ;)
Thank you.
#9