• 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: RS: RTF to unicode conversion
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RS: RTF to unicode conversion


  • Subject: Re: RS: RTF to unicode conversion
  • From: Ricky Sharp <email@hidden>
  • Date: Sun, 3 Jun 2007 13:23:21 -0500


On Jun 3, 2007, at 12:51 PM, Roland Silver wrote:

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?

It appears you're mixing up the concept of text storage format and text encoding. I haven't read the RTF spec in years, but I believe an RTF file contains the character set (i.e. text encoding) used to represent the raw text. Knowing MS, the character set will probably be CP-1252. Word thus appears to be mangling the "proprietary" entries in CP-1252 and not converting them to proper Unicode code points.


Anyhow, if John's suggestion of using TextEdit doesn't pan out, Cocoa does have several APIs for reading/writing RTF data. How those APIs work with various text encodings (if at all), I do not know.

___________________________________________________________
Ricky A. Sharp         mailto:email@hidden
Instant Interactive(tm)   http://www.instantinteractive.com

_______________________________________________

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


References: 
 >RS: RTF to unicode conversion (From: Roland Silver <email@hidden>)

  • Prev by Date: Cocoa controls on top of an OpenGL view
  • Next by Date: Re: Cocoa controls on top of an OpenGL view
  • Previous by thread: Re: RS: RTF to unicode conversion
  • Next by thread: Cocoa controls on top of an OpenGL view
  • Index(es):
    • Date
    • Thread