[TextMate] htmlentitizing text

Nis Sarup nis.sarup at gmail.com
Sat Oct 23 21:13:29 UTC 2004


Howdy textmaters. (that does sound kinda naughty, doesn't it?)

As I live in Denmark I commonly use the special danish characters æøå,
and has tried to make a command to the php htmlentities(9 command on
the selected text:

php -r "echo htmlentities('$TM_SELECTED_TEXT', ENT_QUOTES);"

But, alas, as in the terminal æøå gets mangled into
\303\246\303\270\303\245 before being entitized.
<, &, ", '  and other "normal" special chars gets converted just fine.
Is there a workaround for the brutal mangling of the innocent danish characters?

I know there is already a "Convert to entities" command, but it
converts every character, not just the special ones. And its a bit of
a chore to select every instance of a special character and running a
command on it.

Any thoughts? Anyone?

Nis "Have-a-nice-day" Sarup.

--
BTW: I have 5 Gmail invites. Write me at nis.sarup at gmail.com if you
are in desperate need of a new and fancy email.



More information about the textmate mailing list