mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 01:39:42 +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)
|
||||
private
|
||||
FDefaultEncoding: string;
|
||||
FItems: TAVLTree; // tree of TCodeBuffer
|
||||
FIncludeLinks: TAVLTree; // tree of TIncludedByLink
|
||||
FDestroying: boolean;
|
||||
@ -198,6 +199,7 @@ type
|
||||
write FOnDecodeLoaded;
|
||||
property OnEncodeSaving: TOnCodeCacheEncodeSaving read FOnEncodeSaving
|
||||
write FOnEncodeSaving;
|
||||
property DefaultEncoding: string read FDefaultEncoding write FDefaultEncoding;
|
||||
end;
|
||||
|
||||
|
||||
@ -361,6 +363,8 @@ begin
|
||||
Result.FCodeCache:=Self;// must be called after FileName:=
|
||||
Result.LastIncludedByFile:=FindIncludeLink(Result.Filename);
|
||||
end;
|
||||
Result.DiskEncoding:=DefaultEncoding;
|
||||
Result.MemEncoding:=Result.DiskEncoding;
|
||||
end;
|
||||
|
||||
function TCodeCache.SaveBufferAs(OldBuffer: TCodeBuffer;
|
||||
|
@ -11784,6 +11784,7 @@ begin
|
||||
CodeToolBoss.SourceCache.ExpirationTimeInDays:=365;
|
||||
CodeToolBoss.SourceCache.OnEncodeSaving:=@OnCodeBufferEncodeSaving;
|
||||
CodeToolBoss.SourceCache.OnDecodeLoaded:=@OnCodeBufferDecodeLoaded;
|
||||
CodeToolBoss.SourceCache.DefaultEncoding:=EncodingUTF8;
|
||||
CodeToolBoss.DefineTree.OnGetVirtualDirectoryAlias:=
|
||||
@CodeToolBossGetVirtualDirectoryAlias;
|
||||
CodeToolBoss.DefineTree.OnGetVirtualDirectoryDefines:=
|
||||
|
Loading…
Reference in New Issue
Block a user