Username special characters (Icelandic) in bridge to phpbb3 disappear Username special characters (Icelandic) in bridge to phpbb3 disappear
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Username special characters (Icelandic) in bridge to phpbb3 disappear

Started by jonket, August 13, 2010, 10:07:33 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jonket

This might be a bug or something in phpbb3 bridge

Icelandic special characters are okay in CPG.  User created in CPG as "Árni"  shows up as "Árni"  Works even in test gallery without Icelandic.

After bridging to phpbb3 the icelandic characters are still okay except in usernames.

I can create a user in phpbb3 with special characters but when I go over to CPG they disappear.  Show [�rni] |    Should be [Árni]

It feels like that when CPG is getting the username from phpbb3 user table it does not understand Icelandic characters

This letter "Á" comes after A and before B in our alphabet.  Photos made for user Árni before bridging are transferred to owner BirgirAri after bridging.

I can make an album for �rni and it shows up.  But an album made for " Árni " before bridging goes to another user.

Same behaviour in test gallery.

Hope this makes some sense and gives some ideas where to look for the problem.

Coppermine install: http://siglingar.net/cpg/
Bridging app install: http://siglingar.net/
Coppermine version: cpg1.5.8
Bridging app version: Phpbb3  for CPG 1.5.9

BridgeManager settings:
Bridge app URL:  http://siglingar.net      
Relative path to your bridge app's config file:  ../
Cookie name or prefix:  phpbb3_p32g5

Test user account: Árni / testing  

Clean install test gallery: No theme and no Icelandic

Coppermine install: http://siglingar.net/cpg15x/
Bridging app install: http://siglingar.net
Coppermine version: cpg1.5.7
Bridging app version: Phpbb3 for CPG 1.5.7

Test user account: Árni / testing

Thanks in advance, Jon

                 

jonket

Wonder if there is no solution to this or if I should be looking for a solution somewhere else?

jonket

Well, this might have nothing to do with the bridge to phpbb3.

See this user profile viewing.

http://siglingar.net/cpg/profile.php?uid=112

There was a similar problem with albummgr.php that has already been fixed.

Best regards,  Jon

grzesio

I have same problem with polish chars.

Proper user name: Ludmiła
Is shown as: Ludmi?a

Here is link to user profile: http://www.silesianfoto.pl/galeria/profile.php?uid=62

I'm using Coppermine 1.5.8 bridged with PhpBB 3.0.7-PL1.

Any ideas? I haven't found any information about simmilar problem with albummgr.php on forum

jonket

I would not be surprised that this is a problem with all languages that use special characters and when bridging.

It is only when it is bridged.  And in all browsers.

Here is the thread about the problem with the albmgr.php http://forum.coppermine-gallery.net/index.php/topic,65094.msg323276.html#msg323276

That problem was was fixed quickly.

Hope there will be a solution soon.

Best regards,  Jon

Nibbler

Please see if this code change makes any difference.

Edit bridge/phpbb3.inc.php find


            // Connect to db
            $this->connect();


After it, add this new code


            if ($this->link_id) {
                mysql_query("SET NAMES 'utf8'", $this->link_id);
            }


Nibbler

Try this instead


            global $CONFIG;
           
            if ($CONFIG['charset'] == 'utf-8') {
                mysql_query("SET NAMES 'utf8'", $this->link_id);
            }

grzesio

Nothing. I've tried those ways, even without checking anything - just forcing coppermine to use utf-8 when connecting with DB.

I've checked one more time DB settings. MySQL is set everywhere on UTF-8. Problem appears only in usernames. Comments and Photos are all right. There's no problem with polish characters in phpBB3. I'm still also trying to find some solution on my own, but I'm running out of ideas :/

PS. Thanks for so fast response :)

jonket

As can be seen in the attachment it only affects user names.  All icelandic characters show up in all other places.

The charachters in usernames are okay in phpbb3 and in unbridged CPG.

When bridged CPG fetches users in table from phpbb3 (same database, another table, phpbb3_users instead of cpg15x_users) it looks like CPG looses the characters in username and does not understand them as utf-8.  I do not know the difference betwenn utf-8 and utf-8 *(BOM)  but sometimes that makes a difference.

Best regards,  Jon


jonket

In a clean install of CPG 1.5.8 the username "Ásdís# is registered in the table cpg15x_users as "Ásdís".  But it displays okay in the testgallery as "Ásdís".

This is when I take a look at the database with phpmyadmin

In phpbb3_users the name is registered as "Ásdís", not as  "Ásdís" as in CPG.

Hope this helps somewhat.

Best regards,  Jon

jonket

I have solved this for me.  Hope it helps others.

My problem was that default collation of database was latin1_unicode_ci and CPG uses that.  On the other hand phpbb3 uses collation utf8 (does so when installing).

This resulted in a conflict.  So I set my database to collation utf8.

Installed a fresh CPG install and the CPG tables got the utf8 collation.

Then I added in bridge/phpbb3.inc.php the following

Find:      (line 116 and 117 in CPG 1.5.8)

        // Connect to db
           $this->connect();


After it, add this new code

         cpg_db_query("SET NAMES 'utf8'", $this->link_id);

grzesio


grzesio

Works, but.... Every other regional character which is stored in DB is messed up. If you enter them again - everything is ok.

jonket

You are welcome.

Well, it works.

But now the "User Gallery Alphabetic Tabbing" is not working.  Something simple, probably related.

jonket

Quote from: grzesio on August 28, 2010, 04:20:12 PM
Works, but.... Every other regional character which is stored in DB is messed up. If you enter them again - everything is ok.

I expected that, that is why I did a fresh install.  Not so much work for me since it is still in setup phase. and not much data.

xiaqinghua1989

Welcome one and all to R/F.com, our little cyber-hovel of a web-faire! I am Deadbishop, your friendly neighborhood Administrator. The forum you see around you is but a shadow of it's former self, but I am working to make this new forum live up to the standards of the original.  With everyone's help, I know we can make this happen.
As for me, I work and wander my home faire, which would be the Minnesota Renaissance Festival. You will also find me loitering about here on the forums and in many nights. Ask me a question, I'll give you an answer. (whether or not it makes any sense is entirely up to chance...)     But seriously, any questions about the site whatsoever, just let me know, and I'll do me best to answer them.
ugg boots