h2pas: unicode file names

git-svn-id: trunk@46819 -
This commit is contained in:
mattias 2014-11-12 19:11:26 +00:00
parent f662240d36
commit 43888531e1
2 changed files with 20 additions and 24 deletions

View File

@ -24,7 +24,7 @@ interface
uses
Classes, SysUtils, LCLProc, LResources, LazConfigStorage, XMLPropStorage,
Forms, Controls, Dialogs, FileUtil, LazFileUtils, AVL_Tree,
Forms, Controls, Dialogs, FileUtil, LazFileUtils, LazUTF8Classes, AVL_Tree,
// CodeTools
CodeAtom, CodeTree, KeywordFuncLists, NonPascalCodeTools, BasicCodeTools,
FileProcs, CodeCache, SourceChanger, CodeToolManager,
@ -621,7 +621,7 @@ type
TH2PasParser = class(TExtToolParser)
public
class function DefaultSubTool: string; override;
procedure ReadLine(Line: string; OutputIndex: integer; var Handled: boolean
procedure ReadLine(Line: string; OutputIndex: integer; var {%H-}Handled: boolean
); override; // (worker thread)
end;
@ -1023,9 +1023,9 @@ begin
FCIncludesValid:=true;
//DebugLn(['TH2PasFile.ReadCIncludes Filename="',Filename,'"']);
try
sl:=TStringList.Create;
sl:=TStringListUTF8.Create;
try
sl.LoadFromFile(UTF8ToSys(Filename));
sl.LoadFromFile(Filename);
for i:=0 to sl.Count-1 do begin
if not REMatches(sl[i],'^#include "(.+)"') then continue;
SrcFilename:=Trim(REVar(1));
@ -2236,7 +2236,7 @@ begin
DebugLn(['TH2PasConverter.MergeIncludeFiles merging file '
,'"'+IncludeFile.Filename+'"'+' into "'+TextConverter.Filename+'"']);
try
fs:=TFileStream.Create(UTF8ToSys(IncludeFile.Filename),fmOpenRead);
fs:=TFileStreamUTF8.Create(IncludeFile.Filename,fmOpenRead);
try
SetLength(s,fs.Size);
if s<>'' then begin

View File

@ -1,20 +1,20 @@
<?xml version="1.0"?>
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<Package Version="3">
<Package Version="4">
<Name Value="H2PasWizard"/>
<AddToProjectUsesSection Value="True"/>
<CompilerOptions>
<Version Value="5"/>
<Version Value="11"/>
<SearchPaths>
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)/$(LCLWidgetType)"/>
</SearchPaths>
<CodeGeneration>
<Generate Value="Faster"/>
</CodeGeneration>
<Other>
<CompilerPath Value="$(CompPath)"/>
</Other>
<Parsing>
<SyntaxOptions>
<UseAnsiStrings Value="False"/>
</SyntaxOptions>
</Parsing>
</CompilerOptions>
<Files Count="7">
<Files Count="6">
<Item1>
<Filename Value="h2pasconvert.pas"/>
<UnitName Value="H2PasConvert"/>
@ -29,21 +29,17 @@
<Type Value="LFM"/>
</Item3>
<Item4>
<Filename Value="h2pasdlg.lrs"/>
<Type Value="LRS"/>
</Item4>
<Item5>
<Filename Value="h2passtrconsts.pas"/>
<UnitName Value="H2PasStrConsts"/>
</Item5>
<Item6>
</Item4>
<Item5>
<Filename Value="idetextconvlistedit.pas"/>
<UnitName Value="IDETextConvListEdit"/>
</Item6>
<Item7>
</Item5>
<Item6>
<Filename Value="idetextconvlistadd.pas"/>
<UnitName Value="IDETextConvListAdd"/>
</Item7>
</Item6>
</Files>
<i18n>
<EnableI18N Value="True"/>