Vlad Harchev �g�D�G
> 
> > Here is my quick fix for GB2312&Big5:
> >
> > if (strcmp((char*)pKeyword, "ansicpg") == 0)
> > {
> >       if(param==950)
> >
> > 
>m_mbtowc.setInCharset(XAP_EncodingManager::instance->charsetFromCodepage((UT_uint32)0x404));
> >                         else if(param==936)
> >
> > 
>m_mbtowc.setInCharset(XAP_EncodingManager::instance->charsetFromCodepage((UT_uint32)0x804));
> >                         else
> >
> > 
>m_mbtowc.setInCharset(XAP_EncodingManager::instance->charsetFromCodepage((UT_uint32)param));
> > }
> > Of course,here still needs work.I am not familar with your class,Vlad.
> > I can't convert codepage(CP936 or CP950) to charactset.
> 
>  Yes, your logic is correct, but it should be moved to
> XAP_EncodingManager::charsetFromCodepage()
> - I will do it cleanly today. As for now - use your solution for testing (and
> share with other CJK hackers).

After applying this fix, I can now import Chinese RTF
exported before by AW. However, there are still some serious
problems:

1. Some Chinese characters are eaten or mis-interpreted.
After a quick analysis, I found for the highest bit of second byte
of big5 character being 0, the character is exported incorrect.
For example, the character '�J' 0xa44b
is saved as \'a4J. Even if I hack the it into \'a4\'4b in the RTF,
the imports still incorrect.

2. The exported RTF cannot be read by MSWord 2000.
All Chinese character didn't display.

3. I create an RTF by MSWord 2000 and read by AW,
AW crashed immediately:

** ERROR **: file ie_imp_RTF.cpp: line 492 (UT_Bool
IE_Imp_RTF::PopRTFState()): assertion failed: (pState != NULL)
aborting...
Aborted

4. Copy & paste still didn't work...


-- 
   ~     Chih-Wei Huang (cwhuang)
  'v'    E-Mail       : [EMAIL PROTECTED]
 // \\   CLDP Project : http://www.linux.org.tw/CLDP/ (Coordinator)
/(   )\  CLE  Project : http://cle.linux.org.tw/CLE/  (Developer)
 ^`~'^   HomePage     : http://www.cwhuang.idv.tw/



Reply via email to