Re: problem with accents in rtf files
"Nicolas Roard" <[email protected]> Fri, 16 Feb 2007 17:51:31 +0000
| Newsgroups | gmane.comp.lib.gnustep.user,gmane.comp.lib.gnustep.bugs |
|---|---|
| Message-ID | <[email protected]> |
On 2/16/07, Graham J Lee <[email protected]> wrote: > On 16 Feb 2007, at 16:43, Graham J Lee wrote: > > > On 16 Feb 2007, at 16:23, Camille Bourgoin wrote: > > > >> I have some problems with rtf. When I write an rtf document with > >> accents (like é à ç), > >> TextEdit and Ink read it correctly but non-GNUstep applications > >> (like OpenOffice or > >> MacOSX TextEdit) don't. > >> > > It looks to me, but I can't be sure this is the problem, but > > GNUstep encodes extended characters in RTF (\'XY) as ISO Latin- > > something, whereas Cocoa uses Mac encoding. That _could_ explain > > the discrepancies... but as I say I'm unsure. > > Dug a little deeper...it _appears_ that the "RTFunichar" rule in core/ > gui/TextConverters/RTF/rtfGrammer.y [sic] treats the appended > character as a unichar, irrespective of the character set actually in > play. But I'm not a yacc expert....could anyone confirm that? I think I'm the last one to have worked on the RTF parser, and yes, as far as I remember the parser does not check the character set currently, it assumes unicode.. Sot it needs to check the codepage (eg \mac\ansicpg10000\) -- Nicolas Roard "La perfection, ce n'est pas quand il n'y a plus rien à ajouter, c'est quand il n'y a plus rien à retrancher." -- Antoine de St-Exupéry