Re: Cake & Mysql& UTF-8 :(

2007-09-02 Thread MJ Ray
Mech7 <[EMAIL PROTECTED]> wrote: > header('Content-Type: text/html; charset=utf-8'); > ?> > Or is there a better way that it will always get used automatically > with any layout ? Put it in your server configuration. If using Apache, it's AddDefaultCharset utf-8 Hope that helps, -- MJ Ray <[

Re: Cake & Mysql& UTF-8 :(

2007-09-01 Thread Felix Geisendörfer
> > Or is there a better way that it will always get used automatically > with any layout ? > I think the layout *is* the appropriate place to do this as one may have layouts with different encodings. However, if you want to define a 'default' encoding for all layouts (which you can then overw

Re: Cake & Mysql& UTF-8 :(

2007-09-01 Thread Mech7
Ok so in my layouts i would have to have: Or is there a better way that it will always get used automatically with any layout ? On Sep 1, 2:58 pm, Felix Geisendörfer <[EMAIL PROTECTED]> wrote: > You should also send a HTTP header indicating your content is served as > UTF-8. I think IE needs t

Re: Cake & Mysql& UTF-8 :(

2007-09-01 Thread Felix Geisendörfer
You should also send a HTTP header indicating your content is served as UTF-8. I think IE needs that under circumstances. -- Felix -- My Blog: http://www.thinkingphp.org My Business: http://www.fg-webdesign.de MrG wrote: > I solved my problems with UTF-8 by using this al

Re: Cake & Mysql& UTF-8 :(

2007-09-01 Thread MrG
I solved my problems with UTF-8 by using this alter command after the creation of my database: ALTER DATABASE CHARACTER SET utf8 DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT COLLATE utf8_general_ci ; And in cakephp database configuration:

Re: Cake & Mysql& UTF-8 :(

2007-08-31 Thread Mech7
Thanks this works great with me in 1.2 :) would be nice if this was added in database.default.php or atleast in the comments. On Aug 31, 6:44 pm, djiize <[EMAIL PROTECTED]> wrote: > if you have Cake 1.2, add 'encoding' => 'utf8' in conf/database.php > if you have Cake 1.1, call query("SET NAME 'U

Re: Cake & Mysql& UTF-8 :(

2007-08-31 Thread djiize
if you have Cake 1.2, add 'encoding' => 'utf8' in conf/database.php if you have Cake 1.1, call query("SET NAME 'UTF8' ") just after connexion (don't remember if in database.php or app_model.php) On 31 août, 18:36, Mech7 <[EMAIL PROTECTED]> wrote: > Ah that is great google can't handle them either

Re: Cake & Mysql& UTF-8 :(

2007-08-31 Thread Samuel DeVore
in cake 1.1 I usually add to my app_model.php for the project class AppModel extends Model { function __construct($id = null, $table = null, $ds = null) { parent::__construct($id, $table, $ds); if (!defined('MYSQL_SET_NAMES_UTF8'

Cake & Mysql& UTF-8 :(

2007-08-31 Thread Mech7
Does anybody know how to save utf8 charachters properly in Cake.. when i save special characters they get saved very weird in mysql for exmaple: becomes The database table is set to utf8_general_ci and in the html it is set to utf8 too.. The problem seems to come when saving to mysql