Re: Non-standard Cocoa RTF Unicode encoding?
Re: Non-standard Cocoa RTF Unicode encoding?
- Subject: Re: Non-standard Cocoa RTF Unicode encoding?
- From: Aki Inoue <email@hidden>
- Date: Sat, 6 Jul 2002 23:16:43 -0700
No, this is the "standard" behavior.
The Unicode character directives were added to the RTF specification
several years ago (I think it's the version 1.5).
Prior to that, every single text in RTF files used to be encoded in
font specific encodings and it's still the preferred method since the
majority of RTF readers cannot interpret the relatively new Unicode
spec.
You can look at the descriptions about charset in the RTF specification.
Aki
On 2002.Jul.6, at 04:44 PM, Uli Zappe wrote:
Hi,
looking at TextEdit's behavior it seems that the Cocoa text system
uses a non-standard encoding for a specific range of (obviously not
all!) Unicode characters when *writing* RTF data.
For instance, if you take the Unicode character 0x85dd = (decimal)
34269 and insert it manually into an RTF source code as \u34269 (as
the RTF specs suggest), TextEdit will display the correct character.
However, if you copy this character from the TextEdit document window,
paste it into a new document and save this new document, the character
will be encoded as \'e7\'dd in the RTF source, i.e. as a sequence of
two hex-defined characters. I couldn't find anything about this kind
of behavior in the RTF specs (http://msdn.microsoft.com/library/en-
us/dnrtfspec/html/rtfspec.asp), so it seems non-standard to me.
Does anybody have an explanation for this behavior, and, more
important, know a way to translate \'e7\'dd back to \u34269?
Thanks for any insight!
Bye
Uli
________________________________________________________
Uli Zappe email@hidden
Lorscher Stra_e 5 http://www.ritual.org
D-60489 Frankfurt Fon: +49-700-ULIZAPPE
Germany Fax: +49-700-ZAPPEFAX
________________________________________________________
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.