Czech encoding problem Czech encoding problem
 

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

Czech encoding problem

Started by bigboban, July 24, 2011, 05:45:53 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

bigboban

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?

Joe Carver

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.

bigboban


Joe Carver

Quote from: bigboban on July 25, 2011, 08:48:52 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.

Quote from: bigboban on July 24, 2011, 05:45:53 PMConvert 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?

Quote from: bigboban on July 24, 2011, 05:45:53 PMI 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.


bigboban

My problem is solved!  :)

Quote from: Joe Carver on July 26, 2011, 01:10:28 AM
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.

ΑndrĂ©

Quote from: bigboban on July 26, 2011, 07:27:44 AM
CPG should show exact encoding description

Done in svn revision 8215.