diff options
| author | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2008-06-10 00:01:06 +0200 |
|---|---|---|
| committer | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2008-06-10 00:01:06 +0200 |
| commit | f620d57b75cc72c577e796d45f0427acdc73b7e7 (patch) | |
| tree | 11ea2b0d2c26a332844aa2216b3e928f29dbba2d | |
| parent | 47735c3d73cc677e519cd33b58232c97729596fa (diff) | |
| download | tuxcmd-f620d57b75cc72c577e796d45f0427acdc73b7e7.tar.xz | |
Internal viewer UTF-8 enhancements
| -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; |
