No ěščřžýáíé in the fields of Profile module

DesignWork - November 8, 2007 - 11:03
Project:User Import
Version:5.x-1.3
Component:Code
Category:support request
Priority:normal
Assigned:mat.
Status:active
Description

Dear Maintainer,

I´m trying to import 2000 user in a Drupal 5.3 installation with the user_import_module. I figured out how to import all the special german letters. But only in the usernames i can not have this letters, ä,ö and ü. But I can import them in the profile fields. So is the username not utf_8 or did i missed something? I could change the module code, but I wanted to ask first.

Warm regards from Cologne

Dirk

#1

mansdanielsson - November 15, 2007 - 17:42

Hi there,

I'm using the Profile module, allowing you to create customizable fields for user accounts. The same problem applies to å,ä,ö in the values of custom fields.

Best regards,
The Swede

#2

mat. - January 31, 2008 - 21:50
Title:No ä,ö and ü in the Usernames» No ěščřžýáíé in the fields of Profile module
Assigned to:Anonymous» mat.

Hi there,
I have the same problem - I need to import users with informations into their Profile, but these values (ěščřžýáíé) will disappear in the custom fields.. (and all characters after one of this will disappear too...:-(
Please any help?

Kind regards, mat.

#3

saul11 - February 29, 2008 - 15:20

The ë seems to disappear too...
If no fix can be made, please at least give a warning when any such character is encountered. And anyhow in the meantime warn for this on http://drupal.org/project/user_import and in the readme.

#4

kakor - May 28, 2008 - 12:57

Just bumping this issue. This module would be very useful to me if this issue could only be fixed. I need to import 25.000 users and I would like it a lot better if I didn't have to go through them manually to fix this problem.

#5

Robert Castelo - May 29, 2008 - 20:07

Is there anyone with experience of UTF-8 that wants to fix this?

The code that needs to be fixed is:

_user_import_sanitise_username() in user_import.module

#6

Alatalo - June 18, 2008 - 11:36

I too had trouble with imported usernames so I copy pasted and modified these regexps from the 5.7 core user.module. Now scandinavian characters seem to work properly in imported user names. It's not pretty but so far it seems functional.

user_import.module, line 1174:

// comment out the original regexp
// $username = preg_replace('/[^a-zA-Z0-9@ ]/', ' ', $username);

// modified from 5.7 core user.module
$username = preg_replace('/[^\x80-\xF7 [:alnum:]@_.-]/', ' ', $username);
$username = preg_replace(
'/[\x{80}-\x{A0}'.          // Non-printable ISO-8859-1 + NBSP
'\x{AD}'.                 // Soft-hyphen
'\x{2000}-\x{200F}'.      // Various space characters
'\x{2028}-\x{202F}'.      // Bidirectional text overrides
'\x{205F}-\x{206F}'.      // Various text hinting characters
'\x{FEFF}'.               // Byte order mark
'\x{FF01}-\x{FF60}'.      // Full-width latin
'\x{FFF9}-\x{FFFD}'.      // Replacement characters
'\x{0}]/u',
' ', $username);

#7

sfks - September 9, 2008 - 09:11
Version:5.x-1.3» 5.x-2.x-dev

#8

sfks - September 9, 2008 - 09:14
Version:5.x-2.x-dev» 5.x-1.3

Same problem with 5.x-2x-dev.

The profile fields are truncated with especial characters as º , á ,é, í, ó, ú.

Any workaround?

(Sorry for my change of version...)

 
 

Drupal is a registered trademark of Dries Buytaert.