From 58b76f8a403d8ca05e6ffd3ff821c1a76219c33e Mon Sep 17 00:00:00 2001 From: juha Date: Sun, 6 Oct 2019 08:18:07 +0000 Subject: [PATCH] LazUtils: Remove UTF8Encode calls and suppress warnings in winlazfileutils.inc. Issue #35512. git-svn-id: trunk@61999 - --- components/lazutils/winlazfileutils.inc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/lazutils/winlazfileutils.inc b/components/lazutils/winlazfileutils.inc index c790aa4c3d..0219690a28 100644 --- a/components/lazutils/winlazfileutils.inc +++ b/components/lazutils/winlazfileutils.inc @@ -22,9 +22,9 @@ function GetCurrentDirUtf8: String; var U: UnicodeString; begin - System.GetDir(0, U); + System.GetDir(0, U{%H-}); // Need to do an explicit encode to utf8, if compiled with "-dDisableUtf8RTL" - Result := UTF8Encode(U); + Result := {%H-}U; end; procedure GetDirUtf8(DriveNr: Byte; var Dir: String); @@ -33,12 +33,12 @@ var begin {$PUSH} {$IOCHECKS OFF} - GetDir(DriveNr, U); + GetDir(DriveNr, U{%H-}); if IOResult <> 0 then U := UnicodeString(Chr(DriveNr + Ord('A') - 1) + ':\'); {$POP} // Need to do an explicit encode to utf8, if compiled with "-dDisableUtf8RTL" - Dir := UTF8Encode(U); + Dir := {%H-}U; end; function FileOpenUtf8(Const FileName : string; Mode : Integer) : THandle;