View Issue Details

IDProjectCategoryView StatusLast Update
0033681FPCRTLpublic2018-09-27 09:46
ReporterengkinAssigned ToMichael Van Canneyt 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product VersionProduct Build 
Target Version3.2.0Fixed in Version3.1.1 
Summary0033681: TEncoding.FreeEncodings does not assign nil to FStandardEncodings
DescriptionTEncoding.FStandardEncodings need to be nil to reflect the change on DefaultSystemCodePage, as in LazUtils.

Calling
Steps To ReproduceRun the following program (also attached):

program project1;

{$mode objfpc}{$H+}

uses
  sysutils;

begin
  WriteLn(DefaultSystemCodePage);
  WriteLn(TEncoding.Default.EncodingName);

  DefaultSystemCodePage := 65001;
  TEncoding.FreeEncodings;

  WriteLn(DefaultSystemCodePage);
  WriteLn(TEncoding.Default.EncodingName);
end.
Additional InformationRelated forum post: http://forum.lazarus.freepascal.org/index.php/topic,41026.0.html
TagsNo tags attached.
Fixed in Revision38896
FPCOldBugId
FPCTarget
Attached Files
  • project1.pp (303 bytes)
    program project1;
    
    {$mode objfpc}{$H+}
    
    uses
      sysutils;
    
    begin
      WriteLn(DefaultSystemCodePage);
      WriteLn(TEncoding.Default.EncodingName);
    
      DefaultSystemCodePage := 65001;
      TEncoding.FreeEncodings;
    
      WriteLn(DefaultSystemCodePage);
      WriteLn(TEncoding.Default.EncodingName);
    end.
    
    project1.pp (303 bytes)

Relationships

related to 0032961 resolvedMattias Gaertner Lazarus There is a problem with the default code page and streams 

Activities

engkin

2018-05-03 07:14

reporter  

project1.pp (303 bytes)
program project1;

{$mode objfpc}{$H+}

uses
  sysutils;

begin
  WriteLn(DefaultSystemCodePage);
  WriteLn(TEncoding.Default.EncodingName);

  DefaultSystemCodePage := 65001;
  TEncoding.FreeEncodings;

  WriteLn(DefaultSystemCodePage);
  WriteLn(TEncoding.Default.EncodingName);
end.
project1.pp (303 bytes)

Michael Van Canneyt

2018-05-03 09:09

administrator   ~0108121

Fixed, thanks for reporting!

engkin

2018-05-03 17:16

reporter   ~0108129

Thank you!

Issue History

Date Modified Username Field Change
2018-05-03 07:14 engkin New Issue
2018-05-03 07:14 engkin File Added: project1.pp
2018-05-03 09:02 Michael Van Canneyt Assigned To => Michael Van Canneyt
2018-05-03 09:02 Michael Van Canneyt Status new => assigned
2018-05-03 09:09 Michael Van Canneyt Fixed in Revision => 38896
2018-05-03 09:09 Michael Van Canneyt Note Added: 0108121
2018-05-03 09:09 Michael Van Canneyt Status assigned => resolved
2018-05-03 09:09 Michael Van Canneyt Fixed in Version => 3.1.1
2018-05-03 09:09 Michael Van Canneyt Resolution open => fixed
2018-05-03 09:09 Michael Van Canneyt Target Version => 3.2.0
2018-05-03 17:16 engkin Note Added: 0108129
2018-05-03 17:16 engkin Status resolved => closed
2018-09-27 09:46 Juha Manninen Relationship added related to 0032961