[No Subject]

Objet:   [No Subject] (trouver plus)
De:    
Date:   Dec 08, 2005 11:39

Return-Path: <caché>
Received: by chastell.shot.pl (Postfix, from userid 1000)
 id 3F7017C616; Thu,  8 Dec 2005 11:39:13 +0100 (CET)
Message-ID: <caché>
Date: Thu, 8 Dec 2005 11:39:13 +0100
From: Piotr Szotkowski <caché>
Reply-To: "CiviCRM: General discussion around development" <caché>
Sender: caché
To: caché
Subject: Re: [Crm-dev] Re: [CS dev] Illegal Mix of Collations
In-Reply-To: <caché>
Errors-To: caché
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable
Delivery-Date: Thu, 08 Dec 2005 05:39:44 -0500
X-Forwarded-To: caché
X-Forwarded-For: caché caché
X-Gmail-Received: eef26c12864cfc0b1a50ba91f4d1cfa27a0ea56f
Delivered-To: caché
Received-SPF: neutral (gmail.com: 80.72.33.166 is neither permitted nor denied by best guess record for domain of caché)
Old-Return-Path: <caché>
References: <caché>
 <caché>
Content-Disposition: inline
Organization: OpenNGO
X-PGP-Key: http://shot.pl/pubkey.asc
X-PGP-Key-ID: 0xD128F14A
X-Operating-System: Debian GNU/Linux, up 65 days, 19:22
User-Agent: Mutt/1.5.11
X-BeenThere: caché
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "CiviCRM: General discussion around development"
 <crm-dev.lists.objectledge.net>
List-Unsubscribe: <http://lists.objectledge.net/mailman/listinfo/crm-dev&gt;,
 <mailto:caché?subject=unsubscribe>
List-Archive: <http://lists.caltha.pl/pipermail/crm-dev>
List-Post: <mailto:caché>
List-Help: <mailto:caché?subject=help>
List-Subscribe: <http://lists.objectledge.net/mailman/listinfo/crm-dev&gt;,
 <mailto:caché?subject=subscribe>
Envelope-To: caché

Hello.

Dave Greenberg:

> * Some versions of MySQL use latin-1-swedish as the default collation.
> If Drupal tables are created in these versions - they will carry that
> collation. What version of MySQL are u running?

Actually, all MySQL 4.1+ versions do so, for
backward compatibility (MySQL is a Swedish database).

> * I don't know of a batch way to change the collations of
> all tables in a DB in phpMyAdmin - altho there may be one.

It's enough to change the collation of the database
(the collation information is inherited unless redefined):

ALTER DATABASE `drupal` COLLATE utf8_general_ci;

(Or utf8_unicode_ci - see [1] for details.)

The question is what's the impact of such change on Drupal's (and
its modules') contents. From what I gather, Drupal should use UTF-8
everywhere, so the above change should actually be a good thing (and
should be done on Drupal install). AFAIK, Drupal doesn't do this because
this would be a MySQL-specific change, and they want to have the diff
between MySQL, PostgreSQL and other backends as small as possible (on
one hand, I can't blame them; on the other - using MySQL with UTF-8 data
while telling it it's ISO-8859-1 can backfire in very mysterious ways).

> * If you aren't planning on using i18n features in CiviCRM - you can
> install it with the MySQL 4.0 table create script (civicrm_40.mysql) .
> This doesn't specify the utf-8 collation - so will use the default in
> MySQL.

On MySQL 4.1, this will simply make the MySQL database default to
ISO-8859-1 character set and latin1_swedish_ci collation (the same
Drupal ends up with, as it does not declare anything). Again, as CiviCRM
uses UTF-8 everywhere, this is not good (nor proper), but if you're not
using accented characters, it shouldn't backfire.

(Sample backfiring: when one uses UTF-8, but tells MySQL it's
ISO-8859-1, the letter =C5=81 gets mysteriously mangled. Sometimes.
Which can be a bit frustrating if one has a girlfriend in the
Polish city of =C5=81=C3=B3d=C5=BA, like some of us.) ;o)

So, to sum it up, I'm leaning toward recommending
ALTER DATABASE `drupal` COLLATE utf8_general_ci;
and asking for reports from anyone for whom this didn't
work. (Of course the database name can be different,
and most probably is in most installs of CivicSpace.)

[1] http://dev.mysql.com/doc/refman/4.1/en/charset-unicode-sets.html

Cheers,
-- Shot
--=20
                  I wanted to be Superman, but all I got were
                  these special powers of self-deprecation.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D http://s=
hot.pl/hovercraft/ =3D=3D=3D http://shot.pl/1/125/ =3D=3D=3D
_______________________________________________
Crm-dev mailing list
caché
http://lists.objectledge.net/mailman/listinfo/crm-dev

Creative Commons License
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-Share Alike 3.0 United States Licence.