[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: htmlify a string?
- From: Robert Raschke <rrlua@...>
- Date: Wed, 19 Oct 2005 11:51:12 +0100
Thank you all for the great answers. This will get me started. I
particularly like Rici's ideas at the moment.
I did find that my problem isn't actually as straightforward as
ISO-8859-1 to HTML, since the text I am adding to the HTML page comes
from a DB. And it turns out that the DB will return whatever character
set the DB was configured to use. Most common appears to be UTF-8,
but I haven't yet figured out how to ensure that strings returned from
SQL are a particular character set. More reading on my part is
required.
I think I may end up only needing to "protect" <, >, and &; the
letters will get passed through and the charset of the HTML doc has to
be set properly.
Robby