diff options
Diffstat (limited to 'UViewer.pas')
| -rw-r--r-- | UViewer.pas | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/UViewer.pas b/UViewer.pas index 4169b6a..d10b8a7 100644 --- a/UViewer.pas +++ b/UViewer.pas @@ -400,10 +400,12 @@ begin end; end; - if Valid then TextView.Lines.SetText(LineBuffer.Text) - else begin + if Valid then begin for i := 0 to LineBuffer.Count - 1 do - TextView.Lines.InsertText(AnsiToUtf8(LineBuffer[i]) + #10); + TextView.Lines.InsertText(String(EnsureUTF8String(PChar(LineBuffer[i]))) + #10); + end else begin + for i := 0 to LineBuffer.Count - 1 do + TextView.Lines.InsertText(StrToUTF8(LineBuffer[i]) + #10); end; |
