[mythtv] mythweb translation problem with HTML entities (was Re: [mythtv-commits] mythtv commit: r8618 - in trunk/mythplugins/mythweb by xris)
pstehlik at sophics.cz
Tue Jan 17 21:20:03 UTC 2006
Chris Petersen píše v Út 17. 01. 2006 v 13:07 -0800:
> > Please note that there's one weird thing. The UTF-8 strings are
> > translated to HTML entities and these entities are wrong at several
> > places, for example in page <title> or in div="info_tv" on the title
> > page.
> > I don't know why it happens. I actually don't know why the strings are
> > translated to HTML entities at all. Any reason? I admit I don't know
> > PHP..
> Just means those htmlentities calls need to be made UTF-8 aware. Really
> wish php supported function overloading. Guess I should just write a
> new function that does the htmlentities($strung, ENT_COMPAT, 'UTF-8')
> automatically so I don't have to type that extra stuff every time.
> As for the "why"... mainly because I just don't trust user input (esp.
> data from the listing providers).
I don't understand a word. Mainly because the data from the listing
providers is in real UTF-8, no entities whatsoever. But my translated
strings are in entities, and what's real wrong - in bad entities at
*some* places (while at other places the entities are "correct").
More information about the mythtv-dev