Re: RS: RTF to unicode conversion
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