Share

jfor : XSL-FO to RTF converter

Tracker: Patches

5 Accentued chars problem... - ID: 833820
Last Update: Comment added ( davelopper )

Accentued characters support doesn't work.

JFOR does not handsomely handle accentued characters
such as
the french e acute or grave and so on...
This is because JFOR in the class RtfStringConverter
assumes that
all Unicode chars from 0 to 255 can be translated to
ansi 0-255.
This is false ASCII/ANSI charsets support characters
ranging from 0
to 127. So the characters over 127 have to be escaped
to unicode.
( As they are depending on the language chosen for the
system...)

Please find an appropriate patch attached.

Regards,
Lucas Bruand


lucas bruand ( lbruand ) - 2003-10-31 19:03

5

Open

None

Nobody/Anonymous

None

None

Public


Comments ( 2 )




Date: 2005-08-17 14:59
Sender: davelopper

Logged In: YES
user_id=301306

Another way to patch is by modifying
RtfHeader.writeRtfContent(); after executing
writeControlWord(m_charset), add the following line:
writeControlWord("ansicpg819"); // See
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnrtfspec/html/rtfspec.asp
and http://en.wikipedia.org/wiki/ISO_8859-1
Works for W2K.
Note to WebObjects developers who use that lib to generate
RTF from a WO template: ensure that your component
generating the RTF generates a UTF8 response, that your
.html file is in UTF8, and that the <?xml encoding?> (in the
.html file) is set to UTF8.


Date: 2003-11-12 22:17
Sender: lbruand

Logged In: YES
user_id=59508

This is patch should be closed as rtfString has been
modified accordingly in the CVS.


Log in to comment.

Attached File ( 1 )

Filename Description Download
accentuedchars.diff A patch solving that problem... Download

Change ( 1 )

Field Old Value Date By
File Added 66067: accentuedchars.diff 2003-10-31 19:03 lbruand