forum.coppermine-gallery.net

No Support => Feature requests => Topic started by: jonket on August 30, 2010, 10:57:32 am

Title: Collation check/change/reminder when installing
Post by: jonket on August 30, 2010, 10:57:32 am
I am not familiar with what is the most common use of collation in database.

As far as I can see CPG uses default collation of database it is going to use.

When the intention is to bridge CPG with another application this can cause a conflict (like phpbb3 that uses utf8_bin collation default).

It would be great to be able to choose collation at install to avoid conflict with special characters (table_users).  At least get information that I have to consider what collation to use.

Anyway, since its is using UTF-8, is it such a bad idea that CPG sets at least the collation to utf8-bin during install (if that is the correct one to use in most cases).

I may be talking about things here that I have not much knowledge of and if I am on the wrong track I apologize.

Best regards,  Jon
Title: Re: Collation check/change/reminder when installing
Post by: Αndré on August 30, 2010, 04:19:11 pm
I think you are speaking of the encoding, not the collation.
Title: Re: Collation check/change/reminder when installing
Post by: jonket on August 30, 2010, 05:36:06 pm
Well, I am not a specialist in mysql and databases.

But it made all the difference in bridging with phpbb3 and using phpbb3_users for coppermine when the collation was the same.

Below is a snipping of my definition on a new database.

Below that is a snipping of my tables after CPG 1.5.8 fresh install.  No modifications.

I am a little confused now since I set the database to use utf8_bin collation but it installs anyway as latin1_general_ci collation.

I tried a new install again since I am confused.  

New database set as utf8_bin.  Went into "Operation" for the database in phpmyadmin and there it says collation latin_general_ci.

I change that with "ALTER DATABASE `databasename` DEFAULT CHARACTER SET utf8 COLLATE utf8_bin " before installing CPG and after new install the collation is utf8_bin.

Maybe this is a server problem,  I really don't know.

Anyway, this "problem" caused a lot of search and trial as discussed in thread Username special characters (Icelandic) in bridge to phpbb3 disappear  (http://forum.coppermine-gallery.net/index.php/topic,66531.0.html)

That solution worked for me.  It worked for another one but he had to alter the collation of all his tables.

I find it neccesary to be able to use language's special characters in usernames.

I hope this makes clear what I am talking about.

Am I making sense or is this just rubbish?
 

Best regards,  Jon
Title: Re: Collation check/change/reminder when installing
Post by: Αndré on December 17, 2010, 09:21:56 am
I know what you're talking about. It's the charset (http://en.wikipedia.org/wiki/Character_encoding), not the collation (http://en.wikipedia.org/wiki/Collation). The collation affects only the sorting of the results.