forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: Nad_F on February 06, 2006, 10:33:51 pm

Title: Non english characters in usernames
Post by: Nad_F on February 06, 2006, 10:33:51 pm
Hello!
Tell me please, can I allow users to use usernames with non English letters? Where I need to enter needed characters?
Beforehand many thanks!
 
 
Title: Re: Non english characters in usernames
Post by: Joachim Müller on February 07, 2006, 06:41:57 am
yes, you can enter non-ascii chars as usernames. I don't understand the second part of your question - you enter the name using your keyboard, with encoding set to your language as well as keyboard layout. There have been issues with chinese usernames in the past though, but I don't remember what exactly happened and if/how it was fixed.
Title: Re: Non english characters in usernames
Post by: Nad_F on February 07, 2006, 10:28:19 am
Hello!
When users in our gallery trying to register with russian usernames they got a message that username must be longer than 2 characters. I think I need to add russian characters in the the script where listed allowed characters for usernames.
Beforehand many thanks!
Title: Re: Non english characters in usernames
Post by: Joachim Müller on February 07, 2006, 10:30:01 am
post a link to your page, I guess you're using an outdated version - the 2 char warning sounds familiar...
Title: Re: Non english characters in usernames
Post by: Nad_F on February 07, 2006, 11:06:08 am
http://xrays.com.ru/coppermine/index.php
Thank you!
Title: Re: Non english characters in usernames
Post by: Nad_F on February 07, 2006, 09:21:26 pm
I use Coppermine 1.4.3 (stable), which I've downloaded from http://sourceforge.net/project/showfiles.php?group_id=89658.
Help me please to allow users to use russian characters in usernames.
Beforehand many thanks!
Title: Re: Non english characters in usernames
Post by: Nibbler on February 07, 2006, 09:39:28 pm
You need to switch to utf8 encoding for the string length functions to work properly.
Title: Re: Non english characters in usernames
Post by: Nad_F on February 07, 2006, 09:55:10 pm
I can not switch encoding to UTF-8 because whole site with a JS-menu in WIndows-1251, if I switch to UTF-8 I got problems.
Can I solve this problem without changing encoding?
Thank you!
Title: Re: Non english characters in usernames
Post by: Nibbler on February 07, 2006, 09:57:28 pm
Sure, just rewrite Coppermine's utf_* functions to work with your encoding instead.

 - You might be able to do something if you can get the mbstring extension installed.
Title: Re: Non english characters in usernames
Post by: Nad_F on February 07, 2006, 11:53:04 pm
Cool;) Tell me please, in what file I can rewrite Coppermine's utf_* functions?
Thanks!
Title: Re: Non english characters in usernames
Post by: Nibbler on February 07, 2006, 11:59:04 pm
include/mb.inc.php
Title: Re: Non english characters in usernames
Post by: Nad_F on February 08, 2006, 10:58:13 am
It works, thank you!