Re: RTF to unicode conversion
Re: RTF to unicode conversion
- Subject: Re: RTF to unicode conversion
- From: Matt Neuburg <email@hidden>
- Date: Sun, 03 Jun 2007 12:41:15 -0700
- Thread-topic: RTF to unicode conversion
On Sun, 3 Jun 2007 11:51:32 -0600, Roland Silver <email@hidden>
said:
>Can anyone suggest how to convert a file from RTF format to Unicode?
>
>If I read the file with MS Word and save it as "Unicode Text", the
>result is not quite correct: The EM DASH character (U+2014) is
>converted to HYPHEN-MINUS (U+002D).
>
>Is there an available app to do the conversion?
>
>If I have to write my own, is there some capability in Cocoa to read
>an RTF-encoded file?
Load the RTF file as NSData (using dataWithContentsOfFile), call
NSAttributedString's initWithRTF, extract the string, deal with it as
desired. m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
<http://www.amazon.com/gp/product/0596102119>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden