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: How do you handle character encoding on bridged cpg? western or utf-8  (Read 2626 times)

0 Members and 1 Guest are viewing this topic.

jerx

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 85

After reading many threads about this problem I wanted to get confirmation wether I understood it correctly and get advice on how to handle the encoding.

Usually you advise to use utf-8 encoding, because it is more modern. Everyone who is updating his gallery and was on western encoding should use charsetmgr.php to convert the database entries to utf-8 encoding.

I noticed that many forums use western encoding, so everyone who uses a bridged coppermine might face some problems. I only noticed this problem, because I wanted to display cpg data on my forum by using cpmfetch. Some album titles were displayed incorrectly, because of the different character set of my forum.

To solve this, I was thinking of converting my utf-8 coppermine data to western encoding. The only problem is, that I would need to convert language file to iso-8859-1, too. I guess this is not the best solution:
http://forum.coppermine-gallery.net/index.php?topic=34658.0
In that topic GauGau says that it only postpones the problem and you will have problems on the next update. Unfortunately he does not say what other choices you have.

I think one option would be to convert the forum data to utf-8. But I think this will give you problems on updating your forum.

My forum is phpbb2. I think the next version (phpbb3) will be out this year or beginning of 2008 the latest. phpbb3 also uses utf-8. This makes me wonder which of the above solutions are better for future upgrades (mainly to phpbb3, but also to coppermine 1.5)? Or are there any better solutions?
« Last Edit: February 03, 2007, 02:37:11 pm by GauGau »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: How do you handle character encoding on bridged cpg? western or utf-8
« Reply #1 on: February 02, 2007, 07:13:45 am »

To convert Coppermine's language file I recommend using Uni2Me as suggested in
http://forum.coppermine-gallery.net/index.php?topic=39694.msg189758#msg189758
http://forum.coppermine-gallery.net/index.php?topic=20355.msg136219#msg136219
http://forum.coppermine-gallery.net/index.php?topic=27565.msg127489#msg127489
and various other threads.
If your textual content inside your database is in utf-8, you'll have to convert it as well, which is something that shouldn't be done lightheartedly. It's mandatory to backup your database before doing so.
I suggest trying for a solution the other way round: try to figure out if the content of phpBB can be converted to utf-8. Most BBS apps currently support utf-8 (at least SMF does).
Logged

jerx

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 85
Re: How do you handle character encoding on bridged cpg? western or utf-8
« Reply #2 on: February 02, 2007, 06:06:35 pm »

Thank you for your advise!

I already converted the database with the included convertor without any problem. I also converted the default language file manually. I could not find any post regarding such a tool and I only remembered that one of you admins said it would not be necessary to download anything for conversion. It was not very hard to do it manually. But now I will use the tool you recommended, since there might be some other characters besides the language specific characters which needs to be converted and I haven' t converted the other language files.

I found this article about using utf-8 on phpbb2:
http://www.phpbb.com/kb/article.php?article_id=308

It looks much more complicated to switch phpbb to utf-8. You need to convert much more files and the various methods of converting the database do not look as trustworthy as cpg' s charsetmgr. The author also mentions a problem (no hightlight on search). Therefore I think it is easier to convert cpg to western encoding. And a future upgrade to phpbb3 might be easier as well, because the upgrade script might assume that you are on western encoding.
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 19 queries.