mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 21:29:31 +02:00
Changed the map file name to keep all um UTF-8.
This commit is contained in:
parent
cd8af229a8
commit
55ecd471c8
@ -65,7 +65,7 @@ type
|
|||||||
public
|
public
|
||||||
property SrcMap: TPas2JSSrcMap read FSrcMap write SetSrcMap;
|
property SrcMap: TPas2JSSrcMap read FSrcMap write SetSrcMap;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
procedure SaveJSToStream(WithUTF8BOM: boolean; const MapFilename: string; s: TFPJSStream);
|
procedure SaveJSToStream(WithUTF8BOM: boolean; const MapFilename: TJSWriterString; s: TFPJSStream);
|
||||||
procedure WriteFile(Src, Filename: string);
|
procedure WriteFile(Src, Filename: string);
|
||||||
// Final destination filename. Usually unit, unless combining javascript in single file.
|
// Final destination filename. Usually unit, unless combining javascript in single file.
|
||||||
property DestFileName : String read FDestFileName Write FDestFileName;
|
property DestFileName : String read FDestFileName Write FDestFileName;
|
||||||
@ -226,14 +226,13 @@ begin
|
|||||||
inherited Destroy;
|
inherited Destroy;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPas2JSMapper.SaveJSToStream(WithUTF8BOM: boolean;
|
procedure TPas2JSMapper.SaveJSToStream(WithUTF8BOM: boolean; const MapFilename: TJSWriterString; s: TFPJSStream);
|
||||||
const MapFilename: string; s: TFPJSStream);
|
|
||||||
var
|
var
|
||||||
MapSrc: string;
|
MapSrc: TJSWriterString;
|
||||||
{$ifdef pas2js}
|
{$ifdef pas2js}
|
||||||
i: integer;
|
i: integer;
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
bom: string;
|
bom: TJSWriterString;
|
||||||
{$endif}
|
{$endif}
|
||||||
begin
|
begin
|
||||||
if MapFilename<>'' then
|
if MapFilename<>'' then
|
||||||
|
@ -2482,7 +2482,7 @@ begin
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
try
|
try
|
||||||
WithUTF8BOM:=(Log.Encoding='') or (Log.Encoding='utf8');
|
WithUTF8BOM:=(Log.Encoding='') or (Log.Encoding='utf8');
|
||||||
aFileWriter.SaveJSToStream(WithUTF8BOM,ExtractFilename(MapFilename),buf);
|
aFileWriter.SaveJSToStream(WithUTF8BOM, TJSWriterString(ExtractFilename(MapFilename)), buf);
|
||||||
{$IFDEF Pas2js}
|
{$IFDEF Pas2js}
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
buf.Position:=0;
|
buf.Position:=0;
|
||||||
|
Loading…
Reference in New Issue
Block a user