Re: Problem reading UTF8 source email from OS X Mail application
Re: Problem reading UTF8 source email from OS X Mail application
- Subject: Re: Problem reading UTF8 source email from OS X Mail application
- From: "Steven D. Majewski" <email@hidden>
- Date: Tue, 30 Jan 2007 21:14:27 -0500
On Jan 30, 2007, at 5:52 PM, Tim Barlow wrote:
The Chinese characters are represented in UTF8 by three unicode bytes
however when I received the result from the script each one of
these bytes
is represented by two or more bytes as if a secondary unicode
conversion
has happened for example
original Unicode character = โยต
represented as Unicode bytes = 232 142 138
result of script = (195 168) (194 142) (194 138)
If you look at the unicode points in the character pallette
(unfortunately, you also have to do some hex conversion)
it's clear that is exactly what is happening:
232. = 0xE8 and unicode 00E8 = C3 A8 (utf8)
It's doing a second conversion of unicode code points
(maybe assuming utf-16 ? ) to utf8 encoding.
But I have no idea why that is happening. For me, 'class of result'
for both the source and the content of a message says unicode text --
even when the original message is encoded differently, so there
is some conversion going on.
Are you sure that the email is encoded utf-8 in the mail headers ?
่ ?
-- Steve Majewski
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/mailman//archives/applescript-users
This email sent to email@hidden