richmemo: loading unicode characters

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3741 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
skalogryz
2014-11-18 06:06:49 +00:00
parent ffb78b505e
commit c9f2b4378d

View File

@ -218,8 +218,18 @@ end;
{ TRTFMemoParserr } { TRTFMemoParserr }
procedure TRTFMemoParser.classUnk; procedure TRTFMemoParser.classUnk;
var
txt : string;
ws : UnicodeString;
begin begin
//writelN('unk: ', rtfMajor, ' ',rtfMinor,' ', rtfParam,' ', GetRtfText); //writelN('unk: ', rtfMajor, ' ',rtfMinor,' ', rtfParam,' ', GetRtfText);
txt:=GetRtfText;
if (length(txt)>2) and (txt[1]='\') and (txt[2]='u') and (txt[3] in ['0'..'9']) then begin
SetLength(Ws,1);
ws[1]:=UnicodeChar(rtfParam);
txtbuf:=txtbuf+UTF8Encode(ws);
txtlen:=length(txtbuf);
end;
end; end;
function CharToByte(const ch: AnsiChar): Byte; function CharToByte(const ch: AnsiChar): Byte;