You've already forked lazarus-ccr
* added Win32 RichText save/loading
* updated simpe test (fixing utf8toansi filenames) git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@845 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@@ -36,7 +36,7 @@ type
|
||||
public
|
||||
{ public declarations }
|
||||
end;
|
||||
|
||||
|
||||
var
|
||||
Form1: TForm1;
|
||||
|
||||
@@ -83,7 +83,7 @@ begin
|
||||
if OpenDialog1.Execute then begin
|
||||
fs := nil;
|
||||
try
|
||||
fs := TFileStream.Create(OpenDialog1.FileName, fmCreate);
|
||||
fs := TFileStream.Create( Utf8ToAnsi(OpenDialog1.FileName), fmCreate);
|
||||
RichMemo1.SaveRichText(fs);
|
||||
except
|
||||
end;
|
||||
@@ -98,7 +98,8 @@ begin
|
||||
if OpenDialog1.Execute then begin
|
||||
fs := nil;
|
||||
try
|
||||
fs := TFileStream.Create(OpenDialog1.FileName, fmOpenRead or fmShareDenyNone);
|
||||
// Utf8ToAnsi is required for windows
|
||||
fs := TFileStream.Create(Utf8ToAnsi(OpenDialog1.FileName), fmOpenRead or fmShareDenyNone);
|
||||
RichMemo1.LoadRichText(fs);
|
||||
except
|
||||
end;
|
||||
|
||||
Reference in New Issue
Block a user