i have installed the module on Drupal 5 and all works like a charm until i am trying to upload from a csv file that includes Hebrew Characters for i.e 'שלום' the module presents the first Hebrew name if i do not use the first line for categorazing, but after the upload when i check on the user list i notice that the user name is either autogenerated or has the number 1. if i try to upload the file and remove the ' ' that are worping the user name the module will totaly ignore it and will not even present the name.

Comments

robert castelo’s picture

Version: 5.x-1.x-dev » 5.x-1.2-beta

Currently User Import module allows alphanumeric characters and @-_,. to be used in the username.

Are all the Hebrew characters being stripped out and replaced with spaces?

In future I'd like to do a better search and replace which only strips out specific characters not allowed in usernames by Drupal, but it may be a few weeks before I get round to it, hopefully someone else will get scratch their own itch and provide a patch.

yavan’s picture

cheers
yes all Hebrew characters are being stripped out and replaced with spaces (from A to Z)
or in Hebrew from (א to ת).

photoboy’s picture

Version: 5.x-1.2-beta » 5.x-1.3

First off, thanks to Robert for writing such a useful module.

I'm far from being able to understand the code in a .module file, but this issue of Hebrew (and theoretically other non-Latin) characters - can it be solved, or begin to be solved by editing the regular expression on line 1174 in user_import.module ?

        // username cannot contain an illegal character
        $username = preg_replace('/[^a-zA-Z0-9@ ]/', ' ', $username);
        // username cannot contain multiple spaces in a row
        $username = preg_replace('/[ ]+/', ' ', $username);   

In other words, is it possible to add non-Latin characters to the regular expression and thereby give them a pass ?

It's possible I'm way off base here but who knows.

Thanks

robert castelo’s picture

Status: Active » Fixed

fixed in 5.x-2.0-beta1, please re-open this issue if you can still replicate the bug.

Status: Fixed » Closed (fixed)

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