Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-10-09 00:25:21

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Where is $dbcollate set?

Does anyone know where $dbcollate is set? I can’t find it, only the two cases in txpsql.php.

It seems TXO uses utf8_general_ci as default collate (when available), and the MySQL doc seems to say that utf8_unicode_ci is slightly better.

Not a big deal, but since there’s a lot of cleaning right now, might as well slipt this one in :)

Offline

#2 2006-10-09 02:58:09

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Where is $dbcollate set?

Does anyone know where $dbcollate is set?

It is set in textpattern/setup/index.php, starting about line 220.

It seems TXP uses utf8_general_ci as default collate (when available), and the MySQL doc seems to say that utf8_unicode_ci is slightly better.

Not… exactly. Sort of, but not really. <insert ambiguous smiliey> ;)

It says that:

  • utf8_general_ci is the default collation for UTF-8
  • under certain circumstances utf8_unicode_ci will be “slightly more correct” than utf8_general_ci
  • utf8_general_ci is basic and legacy
  • utf8_unicode_ci only partly supports unicode (at present) and requires special workarounds for some languages

I would think that at this point utf8_general_ci is just the safer bet, but I don’t claim any sort of expertise or training on the subject.

Offline

#3 2006-10-09 04:12:45

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: Where is $dbcollate set?

As soon as I finished upgrading to MySQL 5.0 I’ll test it by altering the collate by hand, see if there some things wrong.

Offline

#4 2007-02-20 23:17:55

hcgtv
Archived Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

Re: Where is $dbcollate set?

What was the consensus, utf8_general_ci or utf8_unicode_ci?

Offline

#5 2007-02-21 07:49:29

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: Where is $dbcollate set?

Beside what the SQL doc says, I haven’t found evidence in one area or the next. Can’t really say. But I use utf8_unicode_ci on several TXP and PunBB set-up, nothing is wrong.

Offline

#6 2007-02-21 14:23:56

hcgtv
Archived Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

Re: Where is $dbcollate set?

Ok, then I guess it doesn’t really matter much. Just getting ready for when I upgrade my web server to Debian Etch and MySQL 5.0.x filters in.

Have you found a good how-to for going from MySQL 4.0 latin to MySQL 5.0 utf8?

Offline

#7 2007-02-21 17:01:57

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: Where is $dbcollate set?

I’ve found a couple of things that did great put together, however I didnt archive these bookmarks :(

From what I remember it’s, in fact, not that big a deal. Dump it with the maximum compatibility possible, edit it by hand to adapt it (setting charset, switching from type= to engine=) and import the edited dump in an utf-8 database.

Last edited by Jeremie (2007-02-21 17:02:31)

Offline

#8 2007-02-21 17:53:15

hcgtv
Archived Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

Re: Where is $dbcollate set?

I’ve been playing with grabbing the databases off my VPS, which is running MySQL 4.0, and importing them to my local server running MySQL 5.0. I found out what you have, that it appears not to be such a big deal, but I just like dotting my i’s and crossing my t’s.

Offline

#9 2007-02-22 05:18:07

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Where is $dbcollate set?

utf8_unicode_ci only partly supports unicode (at present) and requires special workarounds for some languages

But I use utf8_unicode_ci on several TXP and PunBB set-up, nothing is wrong.

That just means that your language(s) happens to be one of those supported properly (as far as you can determine). It’s nice for you to use it, go for it, but it won’t go into the core (the point of opening this thread) unless it can be shown it will work for everybody. :)

Offline

Board footer

Powered by FluxBB