forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 language => Topic started by: bigboban on July 24, 2011, 05:45:53 pm

Title: Czech encoding problem
Post by: bigboban on July 24, 2011, 05:45:53 pm
I have one older album on CPG. Some years ago i started on Windows-1250 codepage so all photos descriptions (hundreds) are in this codepage. But all new versions of CPG are in UTF-8 (i mean czech.php).

So i have two choices:

1) Setup CPG to Windows-1250. Photos descriptions are fine. Convert czech.php from UTF-8 to CP-1250. But still some czech characters are missing in user interface. I check it directly in czech.php and there these characters are NOT missing. I think there is some bug with CP-1250 somewhere in CPG code. This way worked fine in some older versions of CPG, but not in the newest.

2) Setup CPG to UTF-8. User interface is OK in czech, because czech.php is native UTF-8 file. But all photo descriptions are broken.  :-\


What i can do to fix this problem? Is some way how to convert only photo descriptions from CP-1250 to UTF8?
Title: Re: Czech encoding problem
Post by: Joe Carver on July 24, 2011, 11:30:20 pm
You could try to change the db encoding where the descriptions are stored.

Test it on a backup db / possibly on a duplicate test gallery.

See:
http://dev.mysql.com/doc/refman/5.1/en/alter-database.html
and
http://dev.mysql.com/doc/refman/5.0/en/charset-database.html

Post a link to your gallery so someone can take a closer look.
Title: Re: Re: Czech encoding problem
Post by: bigboban on July 25, 2011, 08:48:52 am
http://dev.mysql.com/doc/refman/5.1/en/alter-database.html
This command converts actual data or only sets database encoding?


Post a link to your gallery so someone can take a closer look.
www.digialbum.info
Title: Re: Re: Czech encoding problem
Post by: Joe Carver on July 26, 2011, 01:10:28 am
This command converts actual data or only sets database encoding?
Sorry, but I am not certain enough to reply and do not have much time to look deeper.

Convert czech.php from UTF-8 to CP-1250. But still some czech characters are missing in user interface.
Are you sure the conversion is correct? Can you try manually typing / creating the characters?

I think there is some bug with CP-1250 somewhere in CPG code.
Please be careful with the word bug.
It should only be used when the problem is confirmed as repeatable through testing.

Title: Re: Re: Re: Czech encoding problem
Post by: bigboban on July 26, 2011, 07:27:44 am
My problem is solved!  :)

Are you sure the conversion is correct? Can you try manually typing / creating the characters?

Conversion was correct. But! In CPG is used text "Central European" for czech encoding. But for czech people this is not exact! We have two czech encodings - ISO-8859-2 and Windos-1250 (aka CP-1250). And UTF-8 of course. But in CPG "Central european" means ISO-8859-2. And i used CP-1250 in conversion and it was that problem.

So it was my mistake, but i think CPG should show exact encoding description, and it is "ISO-8859-2".

For example i attach screenshot from Firefox, which has better encoding description. I think it explains all.
Title: Re: Re: Re: Czech encoding problem
Post by: Αndré on July 26, 2011, 12:03:56 pm
CPG should show exact encoding description

Done in svn revision 8215.