Re: utf-8 ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Nathan Rixham wrote:
> PJ wrote:
>> Since I have to use a number of Western languages that have those
>> annoying accents on many characters, I am already finding some
>> annoyances in my code results; like having to enter the á type of
>> stuff in inputs for searches & queries.
>> MySql db is set up for InnoDB with latin1_swedish_ci for Collation; I
>> believe this is default.
>
> in that case you'd have to convert all your databases to utf8 /
> utf_general_ci
>
>> Utf-8 seems to be one way to overcome the problems, but is it the only
>> way - seems a little cumbersome as I have no need for oriental & other
>> extra-terrestrial cyphers. (I'm incorrigibly lazy.)
>
> can't think of any good reason why you shouldn't be using utf-8..
>
>> If it is the only way, what difficulties could I expect from an ISP
>> hosting a virtual site?
>
> none really AFAIK - but converting all your latin1 to utf-8 will be a
> very fun job indeed!
>
I looked at http://developer.loftdigital.com/blog/php-utf-8-cheatsheet
which suggests this:
ALTER DATABASE db_name
CHARACTER SET utf8
DEFAULT CHARACTER SET utf8
COLLATE utf8_general_ci
DEFAULT COLLATE utf8_general_ci
;

ALTER TABLE tbl_name
DEFAULT CHARACTER SET utf8
COLLATE utf8_general_ci
;

or I could do it with phpMyAdmin, right?

 and the only difficulties would appear to be fixing any accent stuff
(don't know yet just what) and that would only be time consuming.

I guess I'm just looking for reassurance that I don't muck up anything
and then have to do tortured acrobatics to redress things again. :-)

-- 
Hervé Kempf: "Pour sauver la planète, sortez du capitalisme."
-------------------------------------------------------------
Phil Jourdan --- pj@xxxxxxxxxxxxx
http://www.ptahhotep.com
http://www.chiccantine.com/andypantry.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux