Fix wrong msgid encoding

It should be encoding specified by Content-Type.

Patch by OBATA Akio. Thanks!!!