Re: tool to encode html entities
On Thu, 16 Nov 2006 21:59:37 -0500, T wrote:
> Hi
>
> Any tools can help me encode html entities? E.g.
>
> from
>
> sed "s/ / /g" < f1 > f2
>
> to
>
> sed "s/ /&nbsp;/g" < f1 > f2
>
> ?
>
> thanks
hi, I found I'd like to talk to myself recently. :-)
$ echo 'sed "s/ / /g" < f1 > f2' | perl -MHTML::Entities -pe 'encode_entities($_)'
sed "s/ /&nbsp;/g" < f1 > f2
Any tools other than Perl?
thanks
--
Tong (remove underscore(s) to reply)
http://xpt.sourceforge.net/
Reply to: