• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: RTF to unicode conversion
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Re: Cocoa controls on top of an OpenGL view
  • Next by Date: Re: NSTableView question
  • Previous by thread: Re: Cocoa controls on top of an OpenGL view
  • Next by thread: How does NSArrayController bind to data model from IB?
  • Index(es):
    • Date
    • Thread