Nearly a month later, thanks, it worked.
On Jul 23, 4:45 pm, Xoubaman <[email protected]> wrote:
> Ok, i'll try that.
>
> So, it's possible to assign the input's value using echo, but cake
> manages it other way and left the input empty due to a charset issue?
>
> Thanks to both.
>
> On Jul 23, 12:50 am, Mark <[email protected]> wrote:
>
> > yepp
> > try it with
> > mb_internal_encoding('UTF-8');
> > in the bootstrap.php
>
> > + make sure, that all files containing hardcoded chars like é are
> > saves asUTF8(not ANSI, as Windows usually saves them)
>
> > On 22 Jul., 23:50, Nejra <[email protected]> wrote:
>
> > > I had the same problem recently. I was using UTF-8 everywhere, but
> > > still got empty input fields. The solution was to enforce PHP's
> > > internal encoding to UTF-8 via some .htaccess (or Apache config)
> > > settings. You can find them here under step
> > > 3:http://developer.loftdigital.com/blog/php-utf-8-cheatsheet
>
> > > Hope this works for you as well.
>
> > > - Nejra
>
> > > On Jul 22, 8:29 pm, Xoubaman <[email protected]> wrote:
>
> > > > Not a charset problem, 99% confirmed.
>
> > > > I try the following code to figure out what's happening:
>
> > > > <?php
> > > > debug($this->data['Profile']['last_name']);
> > > > echo $form->text('Profile.last_name',array('label' => false));
> > > > ?>
> > > > <input id="ProfileLastName" type="text" value="<?php echo $this->data
> > > > ['Profile']['last_name']; ?>" label="" name="data[Profile][last_name]"/
>
> > > > One text input using theformhelper and another one typing it
> > > > "classically". You can see an output screen capture
> > > > athttp://yfrog.com/0wwtferij
>
> > > > The same using UTF-8.
>
> > > > Weird.
>
> > > > On Jul 22, 1:00 am, Mark <[email protected]> wrote:
>
> > > > > useutf8throughout your website
> > > > > saves you usually a lot of trouble :)
>
> > > > > On 21 Jul., 23:34, Xoubaman <[email protected]> wrote:
>
> > > > > > Hello
>
> > > > > > I'm having problems with theformhelper. When afieldcontains chars
> > > > > > like ñ or vocals with accent, the value is not set to the
> > > > > > corresponding input.
>
> > > > > > ie, $this->data is
> > > > > > Array
> > > > > > (
> > > > > > [User] => Array
> > > > > > (
> > > > > > [id] => 1
> > > > > > [username] => foo
> > > > > > )
>
> > > > > > [Profile] => Array
> > > > > > (
> > > > > > [id] => 1
> > > > > > [user_id] => 1
> > > > > > [first_name] => Carlos
> > > > > > [last_name] => Gándara
> > > > > > )
> > > > > > )
>
> > > > > > but echo $form->input('Profile.last_name',array('label' => false));
> > > > > > shows an empty textfield.
>
> > > > > > In the layout i'm using $html->charset('ISO-8859-1'); but I don't
> > > > > > think the problem is here because $this->data gets the correct
> > > > > > value.
>
> > > > > > Any idea? Thanks in advance.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---