[SOLVED] problem with accent caracters

TeHashiX

Joined: 2005-03-16
Posts: 8
Posted: Wed, 2005-03-16 17:16

Hello,

I've some problems with Gallery 2 Beta 1, caracters accent such as é, è, à or ù appears as chinese caracters.
I migrate from my gallery 1.5 albums. In Gallery 1 the caracters appears ok. I made no changes on my server.

I configure Gallery 2 in French language. If I look on the database, caracters are ok, so I think the problem came from the frontend.

What is this caracter problem and how can i resolve it ?

Thank you in advance, and for the very good job you make with gallery.
----

Gallery URL (optional):
Gallery version: G2 Beta 1
Webserver (with version): SME v6.0
Datatabase (with version):
PHP version (eg 4.2.1):
phpinfo URL (optional):
Graphics Toolkit(s): ImageMagick + netpbm
Operating system:
Web browser/version:
G1 version (for migration bugs): 1.5RC2

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Fri, 2005-03-18 07:49

Try getting the latest nightly snapshot and then reenter the characters and see if you can reproduce the problem. I made a fix recently that resolved a problem where we were not using UTF8 everywhere.

 
TeHashiX

Joined: 2005-03-16
Posts: 8
Posted: Sun, 2005-03-20 11:04

I tried to download latest version of gallery 2 with CVS. On refresh gallery prompt me for an Upgrade 0.9.0 to 0.9.3. The upgrade executed succefully. But now I've got a white screen for home page, nothing apprears.

How can I resolve this problem ?

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sun, 2005-03-20 17:00

TeHashiX, please start a new topic for your problem.
(and try immediate debug mode in config.php)

 
TeHashiX

Joined: 2005-03-16
Posts: 8
Posted: Tue, 2005-03-29 19:18

I re-try with latest CVS gallery2. Fresh installation.

Gallery 2 is configured in French, accents in menus appears normal.

When I create a new sub album and put accents in album title or album resumé, all accent caracters appears as chinese.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Wed, 2005-03-30 06:42

What's the url to your G2? Can you enable comments so that we can try it from here? Thanks.

 
bleizh
bleizh's picture

Joined: 2005-03-30
Posts: 2
Posted: Wed, 2005-03-30 08:18

hi,
Gallery 2 is a very nice and usefull application... but...
I'm a french user too (excuse me for my bad english), I have exactly the same problem as TeHashhiX described... I get the latest snapshot (gallery2-2005-03-29) ! it's a fresh installation... but accents appears as chinese in IE or "?" in Firefox in fields title or resume or description of album. The first time i save the files, accents were OK in Mysql database but after many updates of these fields, accents have very strange codes in mysql database. I put directly the accent in MySQl and set an upgrade in order to reset the cache... Accents appears OK since i didn't make change and update these fields.
If I change the codage in navigators, accents are visible in the fields title or resume but no more in the rest of the page...

Thank you for your help !

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Thu, 2005-03-31 04:13

Once again, if you don't give me the url I can't debug this and you're not going to get a fix.

 
bleizh
bleizh's picture

Joined: 2005-03-30
Posts: 2
Posted: Thu, 2005-03-31 06:03

You can find a test G2 here :
http://maele.rat-tatouille.org/main.php

there are only a few photos but i mean it's enough to see how G2 works with our specials characters with accent... If you you need more, you have only to write it !

Thanks a lot for your help

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Fri, 2005-04-01 08:00

Can you give me an account with permissions to create an album? I'd like to try entering text into different fields to see if I can figure out what's going on. Thanks.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Fri, 2005-04-01 08:23

I think that this topic is related.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sat, 2005-04-02 01:57

bleizh, thanks for giving me permissions to add a comment. I think that your problem is actually different than the other thread. It would appear to be an issue with storing and retrieving the data from the database in your case. This will be a little tricky to debug. Would it be possible for me to get ssh access to your box so that I can experiment with storing different values in the database? Thanks!

 
TeHashiX

Joined: 2005-03-16
Posts: 8
Posted: Wed, 2005-04-20 16:44

I'm sorry for not responding the last weeks. We can do more tests if you want.

I install the latest Gallery 2 Beta 2 and the problem is still here.

It seems, like you said, that it is a problem with retrieving data from database, because in mysql fields all accents characters appears in the right format. But in gallery theses accents appears as chinese characters.

My gallery URL is http://tehashix.kicks-ass.org/gallery/
the username is gallery
and the password is gallery2

I know PHP langage and I would like to help you find this bug. But I don't know where to search, wich module...

I will send you a username and password via PM so you could create an album and see the issues.

Thank you.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sun, 2005-04-24 20:50

Good news! I've fixed the problem. It turns out that htmlspecialchars() mangles the character set on PHP 4.1.2, so I've switched to using str_replace instead. Thanks for the access .. I've fixed it in your G2 install and have committed the fix back to CVS so it should be in the next nightly build. Thanks for giving me access, TeHashiX!

 
Netnose

Joined: 2004-01-04
Posts: 3
Posted: Tue, 2005-04-26 07:57

Hi bharat,

has the problem really been solved? I got the nightly build from 04-25-2005 installed. But still the German characters like ä, ü and ö in the menu-block look very strange, as you can see here:

http://xvr.de

Example:
Elemente hinzufügen (should be: Elemente hinzufügen)

Any ideas what could cause this?

Thanks in advance,
Netnose

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sat, 2005-04-30 21:36

This is a different problem, and one I haven't seen before. It appears that the standard localized values aren't coming out correctly for you. The other problems have been because we were mangling values at upload time. Can you enable comments, or create an account that has upload permissions so that we can do more remote testing? Thanks.

 
BigBoss

Joined: 2004-04-14
Posts: 2
Posted: Thu, 2006-04-27 01:29
bharat wrote:
Good news! I've fixed the problem. It turns out that htmlspecialchars() mangles the character set on PHP 4.1.2, so I've switched to using str_replace instead. Thanks for the access .. I've fixed it in your G2 install and have committed the fix back to CVS so it should be in the next nightly build. Thanks for giving me access, TeHashiX!

How did you fix it please ? I just installed a fresh new copy, not cvs, and have the problem !!