#!/bin/blog

March 24, 2005

MIME-Words

Filed under: Internet — Tags: , — martin @ 11:02 pm

Das sind MIME-encoded Words laut RFC 1522 2047:

=?UTF-8?B?5Pb8LmV4ZQ==?=
=?KOI-8?B?YW5uYWtvdXJuaWtvdmEuc2Ny?=
=?ISO-8859-15?B?TfxsbGVyTWVpZXJTY2h1bHplLlBQVA==?=

Codiert werden die z.B. so:

echo "äöü.exe" |
perl -MMIME::Words=:all -ne 'chomp;$_=encode_mimeword($_,B,"utf-8");print"$_\n"'

oder defensiver:

echo "äöü.exe" |
perl -MMIME::Words=:all -pe 'chomp;$_=encode_mimewords($_);$_.="\n"'

Decodiert werden sie so:

echo "=?UTF-8?B?5Pb8LmV4ZQ==?=" |
perl -MMIME::Words=:all -pe '$_=decode_mimewords($_)'

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: