Can't see some images after moving db to UTF-8 Can't see some images after moving db to UTF-8
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Can't see some images after moving db to UTF-8

Started by Colegota, January 27, 2008, 04:28:08 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Colegota

Hi!

I just upgraded two galeries from cpg 1.3.2 to 1.4.14. Then I found the problem of charset, and after a lot of search at forum I first try to execute charsetmgr.php, but as many users, I get the error due to not to have iconv() installed. Then, following this french message, I've export and downloaded db, used iconv at Linux in my pc, and upload it again.

$ iconv -f iso-8859-1 -t utf-8 fotolibre-org-Sql60997_1-20080127.sql -o fl-utf8.sql

Most works fine now, but I have a problem with images containing non-standar chars (as Spanish ñ, á, é...) in filename. Images are there and can be accesed via the old url, but cpg can't show it.

As an example, this is the cpg page for an image:
http://www.fotolibre.org/displayimage.php?pos=-5592
As you can see there, no thumb, intermediate o big image are shown. But for pages where linked the image before there's no problem.
http://www.fotolibre.org/albums/colegota/paisajes/belena/thumb_f-bele%F1a-img_1717-c01-dm.jpg
http://www.fotolibre.org/albums/colegota/paisajes/belena/normal_f-bele%F1a-img_1717-c01-dm.jpg
http://www.fotolibre.org/albums/colegota/paisajes/belena/f-bele%F1a-img_1717-c01-dm.jpg

Well, I have more than 120 images by a dozen users so I try to avoid asking for upload images again. Also is a problem that current images are linked at the forums and blogs and I must not change original files. Just I can maybe change database values, but when I try to do it via phpMyAdmin I get no results.
I also tried to edit file description in cpg image page, but also no results.

I'd like to find a solution, maybe with your help.

Best regards,
Colegota

Colegota

Hi!

I finally found a solution.
I've changed the charset in database via phpMyAdmin to iso-8859-1. Then edited all bad files changing filename from strange chars to correct ones (ex. f-beleña-img_1717-c01-dm.jpg).
After finish, I've changed back charset in database to utf-8, and it works.

Only drawback is that filename in cpg picture page is shown with bad charset (Example) but all the rest is ok.

Regards,
Colegota