Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem reading UTF8 source email from OS X Mail application




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:
http://lists.apple.com/mailman/options/applescript-users/email@hidden
Archives: http://lists.apple.com/mailman//archives/applescript-users

This email sent to email@hidden
References: 
 >Problem reading UTF8 source email from OS X Mail application (From: "Tim Barlow" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.