paste text from office word, space cause mess code

General TRichView support forum. Please post your questions here
Post Reply
wolf1860
Posts: 118
Joined: Sat Nov 21, 2015 2:04 am

paste text from office word, space cause mess code

Post by wolf1860 »

A test docx file sent to [email protected].

Text in word,with show special paragraph symbols:
Image

RVE demo paste result:
Image
wolf1860
Posts: 118
Joined: Sat Nov 21, 2015 2:04 am

Re: paste text from office word, space cause mess code

Post by wolf1860 »

Any suggestions?
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: paste text from office word, space cause mess code

Post by Sergey Tkachenko »

I confirm the problem (unexpected 牋 character).
I need some time to understand why it happens.
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: paste text from office word, space cause mess code

Post by Sergey Tkachenko »

RTF import code did not take into account that in Chinese encoding, the non-breaking space character does not have $A0 code.

Quick fix:
Open RVRTF.pas file, find the line containing the substring:

Code: Select all

Keyword:'~'
Change this line to:

Code: Select all

    (Keyword:'~';        DefValue:$00A0;        UseDef:False;  kwd:rtf_kwd_WideChar; idx:$A0;             AffectTo:rtf_af_None),
wolf1860
Posts: 118
Joined: Sat Nov 21, 2015 2:04 am

Re: paste text from office word, space cause mess code

Post by wolf1860 »

That works perfect! Thank u for ur sweet support:)
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: paste text from office word, space cause mess code

Post by Sergey Tkachenko »

The fixes are included in TRichView 20.1 (uploaded today)
Post Reply