Re: Non-standard Cocoa RTF Unicode encoding?
Re: Non-standard Cocoa RTF Unicode encoding?
- Subject: Re: Non-standard Cocoa RTF Unicode encoding?
- From: Charles Jolley <email@hidden>
- Date: Sun, 7 Jul 2002 10:00:57 -0500
Hi Uli:
Mac OS X has built-in converters for just about every encoding (DOS or
Mac-based) that you could possibly need. All you have to do is figure
out which encoding formats each charset maps to and then use the
standard NSString/CFString functions to convert the string to unicode.
It really isn't very difficult.
I have a list of the encoding mappings around here somewhere, I will
send them to you a little later.
-C
On Sunday, July 7, 2002, at 08:39 AM, Uli Zappe wrote:
Am Sonntag den, 7. Juli 2002, um 08:34, schrieb Aki Inoue:
Hm, do I understand it right that this means that there is no easy
way to convert such an encoding to Unicode?
No, the encodings used in RTF files must be well-known unless the font
itself is a weird font developed for Win 3.x.
They are most likely one of DOS/Windows codepages or MacOS scripts.
Hm, in my RTF test file, the standard characters are defined as
\fcharset77. According to the RTF spec, 77 is "Mac" (I assume Mac
Roman), so this seems consistent. However, the Unicode character 34269
uses \fcharset80; 80, as far as I can see, is not defined as a
character set in the RTF spec anywhere, and an additional \cpg keyword
to specify a codepage is not used.
Even if 80 was a specified character set, how would I translate it into
Unicode? Do I really have to write a conversion table myself in my
code? That's no big deal with 2^8 characters, but it surely is with
2^16...
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.