diff --git a/components/codetools/definetemplates.pas b/components/codetools/definetemplates.pas index 17aec179a4..76c4c1c60a 100644 --- a/components/codetools/definetemplates.pas +++ b/components/codetools/definetemplates.pas @@ -1490,6 +1490,7 @@ function ParseFPCVerbose(List: TStrings; const WorkDir: string; out Filename: String; begin //DebugLn(['ProcessOutputLine ',Line]); + Line:=SysToUtf8(Line); len := length(Line); if len <= 6 then Exit; // shortest match @@ -1544,7 +1545,7 @@ function ParseFPCVerbose(List: TStrings; const WorkDir: string; out Inc(CurPos, 17); NewPath:=SetDirSeparators(copy(Line,CurPos,len)); if not FilenameIsAbsolute(NewPath) then - NewPath:=ExpandFileNameUTF8(AnsiToUtf8(NewPath)); + NewPath:=ExpandFileNameUTF8(NewPath); NewPath:=ChompPathDelim(TrimFilename(NewPath)); {$IFDEF VerboseFPCSrcScan} DebugLn('Using unit path: "',NewPath,'"');