Re: html entities
| From: | Justin Patrin | Date: | Thu, 03 Mar 2005 19:06:18 +0000 |
| Subject: | Re: html entities | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-17818@lists.php.net to get a copy of this message | ||
On Thu, 3 Mar 2005 10:44:03 -0800 (PST), fluidliq@yahoo.com
<fluidliq@yahoo.com> wrote:
> The values are stored in the db in a blob type field. So I assume it is
> stored in its own character. It is fine when displaying on ordinary pages..
> It just doesn't show the characters when I want it to display as values of
> the text elements of QuickForm. And now I want it to show the characters as
> the values of the text elements instead of the HTML entities. How should I
> do that?
Please reply to the list.
I don't know what you mean. How are is it showing up in the form? If
you look at the HTML it should have, for instance:
<input type="text" name="something" value="random &21335;
chars"/>
And it should display and get sent as the actual character.
>
> Justin Patrin <papercrane@gmail.com> wrote:
> On Thu, 3 Mar 2005 06:03:34 -0800 (PST), fluidliq@yahoo.com
> wrote:
> > I have a few quickform text elements which values are grabbed from the db.
> these values from the db are of asian characters. it has no problem showing
> up the characters in normal html text element. I guess PHP PEAR had
> converted the characters into HTML entities like 21335;"û before displaying
> it.
> > Now, how do I convert them to their actual characters and display them as
> the value of the text elements?
> > i had something like this now...
> > $form->addElement("text", "txtName", "Name",
> > array("value" =>
> html_entity_decode($rows['name']));
> > but this doesn't work.
> >
> > please help me
> >
>
> Are these stored in the DB as the actual Asian characters or the HTML
> Entities? They should (IMHO) be stored as the actual chars.
>
> When QF displays the values it will use HTML entities because this is
> the right way to display them. When they're submitted they should be
> actual Asian characters again and not entities. You shouldn't have to
> do any encoding or decoding.
>
> --
> Justin Patrin
>
--
Justin Patrin