• 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: Dominik Pich <email@hidden>
  • Date: Mon, 4 Jun 2007 00:34:23 +0200

This is so not cocoa...... why are you asking here? :/

On Jun 3, 2007, at 11:32 PM, Roland Silver wrote:

John Stiles,
My copy of (Tiger) TextEdit has only four options for output file format: Rich Text Format (RTF), HTML, Word Format, and Word XML format. None of these produces a simple Unicode file (eg UTF-8) without a lot of metatext.


I HAVE found a way to convert from RTF to UTF-8, however. Using the app AbiWord, I can input an RTF file (e.g. foo.rtf), and save it as "Encoded Text" with any of a variety of encodings, including "Unicode UTF-8".
A fragment of text from the result (foo_enc.txt) appears to be valid UTF-8:
rollos$ od -tx /foo
0000000 69 64 65 73 e2 80 94 69 6c 6c 69 73 0a 000000
i d e s EM DASH i l l i s LF
U+2014
--Roland Silver


On Jun 3, 2007, at 12:07 PM, John Stiles wrote:

Have you tried TextEdit? That would be using all the Cocoa ways to do it.
If it works in acceptable ways, it is open source: /Developer/ Examples/AppKit/TextEdit/



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?


_______________________________________________

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


_______________________________________________

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>)
 >Re: RS: RTF to unicode conversion (From: John Stiles <email@hidden>)
 >Re: RS: RTF to unicode conversion (From: Roland Silver <email@hidden>)

  • Prev by Date: RTF to unicode conversion
  • Next by Date: IBPalette Project: Drop NSActionCell proxy icon into NSTableColumn --> Weirdness
  • Previous by thread: RTF to unicode conversion
  • Next by thread: Re: RS: RTF to unicode conversion
  • Index(es):
    • Date
    • Thread