Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[tlug] Mojibake mail



Hi,

I make a script with Perl to insert mail automatically to MySQL. I have a
mojibake problem with some mails. I can view them perfectly with Sylpheed,
but if I save them as text files, then the mojibake happens. I have tried
using emacs, vi, and mozilla to view the text files, but nothing works. 

Here is some header parts from one of the mail:

-- START MAIL HEADER --
...
Message-ID: <000101c2c228$7c62df10$1501a8c0@example.com>
MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_0002_01C2C273.EC4A8710"
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook, Build 10.0.2627
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
X-UIDL: [<N!!MQ~"!g&$"!,H##!
-- END MAIL HEADER --

When I save as text file, and using text editor to view it, the body part
looks like this:

-- START BODY PART --
------=_NextPart_000_0002_01C2C273.EC4A8710
Content-Type: text/plain;
	charset="iso-2022-jp"
Content-Transfer-Encoding: quoted-printable

=1B$B<:Ni$7$^$7$?!#Aw?.@example.com$NJ}$r4V0c$($F$7$^$C$?$N$G:FEYAw?.$7$^$9!#=1B(B
=20
=1B$B@example.com<R0w$K$7$F$b$i$($k$H$N;v$G$*OC$r;G$C$?$N$G$9$,=1B(B
=1B$BFMA3$H8@$&;v$b$"$j4r$7$$H?LLJ9$-K:$l$F$7$^$C$?2U=3Dj$,=1B(B
=1B$B?t2U=3Dj$"$k$N$G<ALd$N%a!<%kAw$i$;$FD:$-$^$9!#=1B(B
=20
...
-- END BODY PART --

What do you think is the problem? How can I fix this? I have tried
Jcode.pm but it didn't work. Please help, and thanks a lot.

--bk


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links