From f620d57b75cc72c577e796d45f0427acdc73b7e7 Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Tue, 10 Jun 2008 00:01:06 +0200 Subject: Internal viewer UTF-8 enhancements --- UViewer.pas | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'UViewer.pas') 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; -- cgit v1.2.3