Next time you find yourself staring at an ugly block of HTML-ish text, copied from the source of an email message, full of strange “=3D” and trailing “=” characters, take heart. The nastiness you’re seeing is called quoted-printable format, and it’s how email keeps lines to a short enough length to be widely compatible with all manner of email servers.
Installation
Download this file, double-click it, and TextMate should do the rest. You’ll now have a command in your Text bundle that you can use to undo the quoted-printable encoding.
It changes this:
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Dutf-8">
<META content=3D"MSHTML 6.00.2900.3199" name=3DGENERATOR></HEAD>
<BODY style=3D"MARGIN: 4px 4px 1px; FONT: 10pt Tahoma">
<DIV>Good afternoon,</DIV>
<DIV><BR>Please see the following information from Company. Please =
let me know if you have any questions or concerns.<BR><BR>Thanks,<BR>Bobby=
<BR>12/18/07 10:18 AM >>><BR></DIV></BODY></HTML>
To this:
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<META content="MSHTML 6.00.2900.3199" name=GENERATOR></HEAD>
<BODY style="MARGIN: 4px 4px 1px; FONT: 10pt Tahoma">
<DIV>Good afternoon,</DIV>
<DIV><BR>Please see the following information from Company. Please let me know if you have any questions or concerns.<BR><BR>Thanks,<BR>Bobby<BR>12/18/07 10:18 AM >>><BR></DIV></BODY></HTML>
Caveat – this command only removes the quoted-printable formatting, don’t expect it to work any magic to make the actual HTML standards compliant.
Enjoy!
Michael,
I found this snippet just when I needed it. So, thanks for that!
Unfortunately, upon running it on a copied-and-paste e-mail raw source file I got the following:
dyld: NSLinkModule() error
dyld: Symbol not found: _php_sig_gif
Referenced from: /usr/lib/php/extensions/no-debug-non-zts-20060613/gd.so
Expected in: dynamic lookup
Running Intel Leopard 10.5.1 (Build 9B18) and TextMate 1.5.7 (1436)
Any suggestions?
Luc - January 14, 2008
Luc,
If you’re still out there, sorry for the delayed response. Hope you got it figured out, but if not, all I can tell you is that I’m using xampp for my PHP, and that seems to work great.
This thread might help you track down the source of your problem, or at least get you going in the right direction.
http://www.omnigroup.com/mailman/archive/macosx-admin/2007-December/057176.html
Thanks.
Michael Lehmkuhl - February 23, 2008