[SVN] HTML output encoding (was: licenses, redistributing perl)
Allan Odgaard
allan at macromates.com
Sun Feb 20 10:30:59 UTC 2005
On Feb 19, 2005, at 19:51, Eric Hsu wrote:
>> What is wrong with doing the entity substitution inline instead of
>> calling encode_entities?
> Your version caught <'s, but I was trying to faithfully reproduce the
> range of entities, like symbols and accented characters. Much to my
> surprise, on further testing, your simple version preserved these much
> better than the encoding-processed version. I guess HTML::Entities
> doesn't encode Mac characters (or utf-8?) characters particularly
> well.
Yes, the HTML::Entities function would probably need to be given an
input encoding to really work, not sure what their default is. PHP has
the same “problem”.
> I reverted to the inline version and made the HTML declare a utf-8
> encoding.
Okay, I do expect all output from shell commands to be in utf-8 and
it's not necessary to actually declare this encoding for HTML output.
More information about the textmate-dev
mailing list