Hurray!!!!

everything's working!!!

i changed the entire DB charset/collations to UTF-8 and added
"defaultCharSet = UTF-8" to my PHP.ini

tonight i'll be veeery drunk :)

On 9 Lug, 17:07, Ernesto <[email protected]> wrote:
> Yes the data is being saved but with "0000-00-00 00:00:00" value
>
> On 9 Lug, 16:36, Martin Westin <[email protected]> wrote:
>
>
>
> > Then Cake might be trying to save utf8 to the "latin" database and
> > converting the data for you at some stage.
>
> > Come to think of it... is the problematic data being saved to the db?
> > Can you check the contents of the database directly?
> > Cake might be converting the encoding at the output of the dump.
>
> > As a rule, when you have the db, Cake or the html set to a different
> > character encoding than the others you will see strange things with
> > non-latin characters. (then again, the minus-sign should be generic
> > enough to pass untouched).
>
> > Sorry, just ramblings. I havent investigated the details. I just
> > figured I'd better set everything to the same encoding to avoid
> > further problems (and oh boy did I have problems at one point).
>
> > On Jul 9, 3:02 pm, Ernesto <[email protected]> wrote:
>
> > > Hi Martin.
>
> > > i really appreciated your hints.
>
> > > here's my findings
> > > - I coded an "echo '----';" in the non-working layout --> the dashes
> > > are correctly printed.
> > > - I coded another "echo '----';" in one of the non-working views -->
> > > the dashed are still correctly printed
> > > - The data is auto-filled by the controller, this app has no forms
> > > - all 5 views are using the same DB Connection and the same Database
> > > - the SQL Connection, the DB and all the DB's tables have the same
> > > collation ("latin1_swedish_ci")
> > > - all the DateTime fields has no collation selected
> > > - Cake app has UTF-8 encoding
>
> > > the problem is still here :(
>
> > > On 9 Lug, 11:54, Martin Westin <[email protected]> wrote:
>
> > > > Did I get this right:
> > > > This problem is with datetime-fields when one of your layouts is used
> > > > bit not the other.
>
> > > > The problem looks a bit like an encoding problem (utf8/latin1) of some
> > > > kind. I try to make sure that html layouts, Cake's app encoding, sql
> > > > connection, database, tables and fields... in short: everything uses
> > > > the same encoding.
>
> > > > if you pr (or debug) the data, it will still be output to the browser
> > > > and to be sure the dashes (minuses) are ok you need to look at the
> > > > source of the html output.
>
> > > > You should start by looking at the form (the data is from a form?)
> > > > before posting. Does the problem-layout output the dashes ok?
> > > > Look at the html head for encoding info, compare to any encoding
> > > > headers sent (using Firefox, Developer extension).
> > > > Compare that to the working layout.
>
> > > > Then work your way back towards the model. Check in the controller,
> > > > then the Model. Hopefully you will find where thing do crazy.
>
> > > > My guess is either in the initial output to the form, or in the post
> > > > back to Cake.
>
> > > > On Jul 9, 11:05 am, Ernesto <[email protected]> wrote:
>
> > > > > i still haven't find a solution...
>
> > > > > i pr-ed $this->data in model::beforeSave.
>
> > > > > everything looks correct.
>
> > > > > this could be a MySQL-related issue :(
>
> > > > > On 8 Lug, 17:18, Ernesto <[email protected]> wrote:
>
> > > > > > this app is a very simple app. It is composed by a single 
> > > > > > controller,
> > > > > > two layouts and 5 views.
> > > > > > there's no app_controller or app_model and even no behaviors.
> > > > > > i'm having this problem on the last 2 views, both using the second
> > > > > > ("striptothebone") layout.
> > > > > > The other 3 views are working fine.
> > > > > > Every views saves one DateTime.
>
> > > > > > On 8 Lug, 16:48, Robert P <[email protected]> wrote:
>
> > > > > > > There are a lot of resulting steps between you passing in your 
> > > > > > > data
> > > > > > > and the resulting SQL being queried. Please provide some more
> > > > > > > information and code examples.
>
> > > > > > > On Jul 8, 9:33 pm, Ernesto <[email protected]> wrote:
>
> > > > > > > > DateTime
> > > > > > > > default = null
> > > > > > > > null field
>
> > > > > > > > On 8 Lug, 15:20, Alastair <[email protected]> wrote:
>
> > > > > > > > > On Jul 8, 2:15 pm, Ernesto <[email protected]> wrote:
>
> > > > > > > > > > Hello.
>
> > > > > > > > > > i'm having some troubles with cake.
>
> > > > > > > > > > here's my this->data array
>
> > > > > > > > > > Array(
> > > > > > > > > >         [id] = 30
> > > > > > > > > >         [date] = 2009-11-23
> > > > > > > > > > )
>
> > > > > > > > > > here's a piece of my SQL dump
>
> > > > > > > > > > UPDATE `table` SET `id` = 30, `date` = '2009&#45;11&#45;23' 
> > > > > > > > > > WHERE
> > > > > > > > > > `table`.`id` = 30
>
> > > > > > > > > > why is cake de-coding the "-" in date???
>
> > > > > > > > > Is the "date" field definitely a date or datetime type in your
> > > > > > > > > database?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to