mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-20 10:59:07 +02:00
IDE: new codebuffers now use UTF-8 as encoding
git-svn-id: trunk@18166 -
This commit is contained in:
parent
eafa3fa246
commit
3870f0df36
@ -128,6 +128,7 @@ type
|
|||||||
|
|
||||||
TCodeCache = class(TObject)
|
TCodeCache = class(TObject)
|
||||||
private
|
private
|
||||||
|
FDefaultEncoding: string;
|
||||||
FItems: TAVLTree; // tree of TCodeBuffer
|
FItems: TAVLTree; // tree of TCodeBuffer
|
||||||
FIncludeLinks: TAVLTree; // tree of TIncludedByLink
|
FIncludeLinks: TAVLTree; // tree of TIncludedByLink
|
||||||
FDestroying: boolean;
|
FDestroying: boolean;
|
||||||
@ -198,6 +199,7 @@ type
|
|||||||
write FOnDecodeLoaded;
|
write FOnDecodeLoaded;
|
||||||
property OnEncodeSaving: TOnCodeCacheEncodeSaving read FOnEncodeSaving
|
property OnEncodeSaving: TOnCodeCacheEncodeSaving read FOnEncodeSaving
|
||||||
write FOnEncodeSaving;
|
write FOnEncodeSaving;
|
||||||
|
property DefaultEncoding: string read FDefaultEncoding write FDefaultEncoding;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -361,6 +363,8 @@ begin
|
|||||||
Result.FCodeCache:=Self;// must be called after FileName:=
|
Result.FCodeCache:=Self;// must be called after FileName:=
|
||||||
Result.LastIncludedByFile:=FindIncludeLink(Result.Filename);
|
Result.LastIncludedByFile:=FindIncludeLink(Result.Filename);
|
||||||
end;
|
end;
|
||||||
|
Result.DiskEncoding:=DefaultEncoding;
|
||||||
|
Result.MemEncoding:=Result.DiskEncoding;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TCodeCache.SaveBufferAs(OldBuffer: TCodeBuffer;
|
function TCodeCache.SaveBufferAs(OldBuffer: TCodeBuffer;
|
||||||
|
@ -11784,6 +11784,7 @@ begin
|
|||||||
CodeToolBoss.SourceCache.ExpirationTimeInDays:=365;
|
CodeToolBoss.SourceCache.ExpirationTimeInDays:=365;
|
||||||
CodeToolBoss.SourceCache.OnEncodeSaving:=@OnCodeBufferEncodeSaving;
|
CodeToolBoss.SourceCache.OnEncodeSaving:=@OnCodeBufferEncodeSaving;
|
||||||
CodeToolBoss.SourceCache.OnDecodeLoaded:=@OnCodeBufferDecodeLoaded;
|
CodeToolBoss.SourceCache.OnDecodeLoaded:=@OnCodeBufferDecodeLoaded;
|
||||||
|
CodeToolBoss.SourceCache.DefaultEncoding:=EncodingUTF8;
|
||||||
CodeToolBoss.DefineTree.OnGetVirtualDirectoryAlias:=
|
CodeToolBoss.DefineTree.OnGetVirtualDirectoryAlias:=
|
||||||
@CodeToolBossGetVirtualDirectoryAlias;
|
@CodeToolBossGetVirtualDirectoryAlias;
|
||||||
CodeToolBoss.DefineTree.OnGetVirtualDirectoryDefines:=
|
CodeToolBoss.DefineTree.OnGetVirtualDirectoryDefines:=
|
||||||
|
Loading…
Reference in New Issue
Block a user