On Tue, Oct 30, 2012 at 10:06:45PM +0100, Matthias Apitz wrote:
> I have mail in mutt with the an encoded Subject: line which seems to decode
> wrong (the German Umlaut ü is not shown); how could I decode the line
> 
>     Subject: 
> =?UTF-8?B?Uu+/vWNrc2VuZHVuZyAoTnIuIEUtQS0yMTcyKSBhYmdlc2NobG9zc2Vu?=
> 
> to UTF-8 chars to check what is wrong? Thanks
You can use the "base64" command on the part between "=?UTF-8?B?" and
"?=":
$ echo -n 'Uu+/vWNrc2VuZHVuZyAoTnIuIEUtQS0yMTcyKSBhYmdlc2NobG9zc2Vu' | base64 -d

Looking at the result, where you are supposed to have a "ü", you get the
hexadecimal number 0xEFBFBD. This is the UTF-8 value of character
U+FFFD, which is describe as "REPLACEMENT CHARACTER" in Unicode
standard.
My guess is that "ü" was originally correctly written, then read with a
mail program or operating system not able to understand or display it.
Because of this the "replacement character" was used, and then reused in
a mail reply.
First time I see that.
-- 
Bernard Massot

Reply via email to