coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 bridging => Topic started by: jerx on February 02, 2007, 02:33:53 AM

Title: How do you handle character encoding on bridged cpg? western or utf-8
Post by: jerx on February 02, 2007, 02:33:53 AM
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?
Title: Re: How do you handle character encoding on bridged cpg? western or utf-8
Post by: Joachim Müller 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).
Title: Re: How do you handle character encoding on bridged cpg? western or utf-8
Post by: jerx 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.