Hi Marc, Changing encoding to ISO worked perfectly
Thanks a bunch :D On Jul 11, 1:23 pm, Marc MENDEZ <[EMAIL PROTECTED]> wrote: > Hi, > > Just an idea : it seems that it does not work when it's display (since > you say you can store it in the database) > > Check if you have the same trouble with any other non alaphabetic > character (dollar, ...) > Check as well in the core.php, the value of "App.encoding" parameter. > Try to use ISO charset instead of UTF-8 > > Adrian a écrit : > > > Hi > > > It's a nice idea, but I would like to keep the text field as free text > > so anything can be entered e.g. > > " Up to £10 an hour" or "£24k a year plus benifits" > > it's stored as a VARCHAR in the database, I have tried putting pound > > signs in other text and textarea fields and the same thing happens, > > the value is accepted and is placed in the database, when viewing a > > job it all looks how it should, it's just the form helper doesn't seem > > to like outputting pound signs. > > > On Jul 11, 12:28 pm, "Sam Sherlock" <[EMAIL PROTECTED]> wrote: > > >> what about the number helper currency? > > >>http://book.cakephp.org/view/215/number > > >> the following > >> e($number->currency('12887.57','GBP')); > > >> outputs the following (with ncr) > > >> £12,887.57 > > >> 2008/7/11 Adrian <[EMAIL PROTECTED]>: > > >>> For now I have settled with: > > >>> [code] > > >>> <input name="data[Job][salary]" type="text" value="<?php echo > >>> $job['Job']['salary']?>" id="JobSalary" /> > > >>> [/code] > > >>> This works but if validation fails the elements value is not filled > >>> in. > > >>> :S > > >>> On Jul 11, 12:16 pm, Adrian <[EMAIL PROTECTED]> wrote: > > >>>> Hey, thanks for the reply > >>>> I tried this but it is rendered as " £ " when used as a form > >>>> element value. > > >>>> On Jul 11, 11:23 am, "dr. Hannibal Lecter" <[EMAIL PROTECTED]> > >>>> wrote: > > >>>>> Did you try putting the pound sign as an entity? i.e. £ ? > > >>>>> Adrian wrote: > > >>>>>> Hi, > > >>>>>> I am developing a simple job search site in CakePHP 1.2 and I have a > >>>>>> problem with the text form helper. When editing a job I have a text > >>>>>> box to enter a salary e.g. "�24,000-�30,000 a year" so I have used > > >>> the > > >>>>>> form helper in my edit view like this: > > >>>>>> [code] > > >>>>>> <?php echo $form->text('Job.salary', array('value' => $job['Job'] > >>>>>> ['salary']))?> > > >>>>>> [/code] > > >>>>>> This gives me an empty text box if $job['Job']['salary'] contains a � > >>>>>> sign, if I enter anything without a � sign it's fine. Does anyone > > >>> know > > >>>>>> a good way of correcting this? I tried using the clean function but > > >>> it > > >>>>>> doesn't strip � signs out. Also I don't think this happened in 1.1. > > >>>>>> Any help would be appreciated. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
