Hi,
Please don't forget to commit this before release - otherwise AW will fail
sometimes doing cut & paste of CJK text.
Best regards,
-Vlad
---------- Forwarded message ----------
Date: Wed, 22 Nov 2000 20:29:50 +0400 (SAMT)
From: Vlad Harchev <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Re: concerns on export of CJK text to RTF
On Wed, 22 Nov 2000, ha shao wrote:
I've attached a patch that should escape '\','{','}' when exporting to CJK.
> On Wed, Nov 22, 2000 at 03:31:08PM +0400, [EMAIL PROTECTED] wrote:
> >
> > Can it be that for some encoding (say Big5) the byte of multibyte sequence is
> > some special RTF character like "\" or "}" or "{"? If yes, we have to quote
> > them (with '\') when writing bytes of multibyte string to RTF file.
> >
>
> Absolutely. The 2nd byte of a big5 char could be '\','{','}'. Actually,
> the 2nd type of a big5 char can be pretty much anything. :) So
> it's better to escape any thing that could be a RTF char. This exist
> in BIG5, GBK (an extension to GB2312). GB2312 has no such problem.
>
> >
> > As for the last ha shao's patch wv to to support word6 import of CJK docs -
> > are there any reasons not to commit it? (I don't see any).
> >
>
> I saw a email from Dom said that the patch was commited. It should be
It's nice. I didn't follow carefully.
> in cvs now. If word6 still does not import properly, it could be another
> feature from MS. :)
>
> --
> Best regard
> ha_shao
>
Best regards,
-Vlad
--- ie_exp_RTF_listenerWriteDoc.cpp-was Wed Nov 22 20:25:45 2000
+++ ie_exp_RTF_listenerWriteDoc.cpp Wed Nov 22 20:27:13 2000
@@ -207,6 +207,13 @@
else
{
for(int i=0;i<mblen;++i) {
+ switch (mbbuf[i])
+ {
+ case '\\':
+ case '{':
+ case '}':
+ *pBuf++ = '\\';
+ };
*pBuf++ = mbbuf[i];
}
}