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
Description

Role label validation does not support Unicode characters

$pattern = "'(\w+)\|(\w+)'";

should be
$pattern = "'(\pL+)\|(\pL+)'";

#1

Bacteria Man - August 31, 2009 - 23:26
Assigned to:Anonymous» Bacteria Man

Ah, good catch. I will role this into the next release. Thanks!

#2

Bacteria Man - September 2, 2009 - 23:47
Status:active» fixed

This issue has been fixed and is part of the newest release. Thanks again for reporting it.

#3

System Message - September 16, 2009 - 23:50
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

#4

lukebrenner - October 7, 2009 - 12:55
Version:6.x-1.3» 6.x-1.4
Status:closed» needs work

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

Bacteria Man - October 7, 2009 - 17:56

What version of PHP are you using? Is this your own local server or a web host?

#6

lukebrenner - October 7, 2009 - 18:59

Hi,
I am using PHP 5.2.6 and this is a VPS running Centos 5.3.

#7

Bacteria Man - October 8, 2009 - 06:29

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

lukebrenner - October 9, 2009 - 07:22

Well, I guess I just have to leave it the way it works for me then ;)

Thank you.

#9

Bacteria Man - October 9, 2009 - 13:36
Status:needs work» closed
 
 

Drupal is a registered trademark of Dries Buytaert.