Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Czech encoding problem  (Read 23621 times)

0 Members and 1 Guest are viewing this topic.

bigboban

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Czech encoding problem
« 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?
Logged

Joe Carver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1545
  • aka 'i-imagine'
    • Home Page
Re: Czech encoding problem
« Reply #1 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.

bigboban

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Re: Czech encoding problem
« Reply #2 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
Logged

Joe Carver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1545
  • aka 'i-imagine'
    • Home Page
Re: Re: Czech encoding problem
« Reply #3 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.

bigboban

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Re: Re: Czech encoding problem
« Reply #4 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.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Re: Re: Czech encoding problem
« Reply #5 on: July 26, 2011, 12:03:56 pm »

CPG should show exact encoding description

Done in svn revision 8215.
Logged
Pages: [1]   Go Up
 

Page created in 0.023 seconds with 20 queries.