View Issue Details

IDProjectCategoryView StatusLast Update
0036504FPCRTLpublic2020-01-02 20:05
ReporterBart BroersmaAssigned ToOndrej Pokorny 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Platformi386OSWindowsOS Version10
Product Version3.3.1Product Buildr43805 
Target VersionFixed in Version3.3.1 
Summary0036504: TEncoding.IsSingleByte returns False for Windows ANSI codepages.
DescriptionTEncoding,IsSingleByte returs False for Windows single byte codepages.

Consider this test program:

Program Test;
uses
  SysUtils;
begin
    writeln('TEncoding.ANSI.IsSingleByte = ',TEncoding.ANSI.IsSingleByte);
    writeln('TEncoding.ANSI.CodePage = ',TEncoding.ANSI.CodePage);
    writeln('TEncoding.GetEncoding(1252).IsSingleByte = ',TEncoding.GetEncoding(1252).IsSingleByte);
    writeln('TEncoding.GetEncoding( 850).IsSingleByte = ',TEncoding.GetEncoding(850).IsSingleByte);
    writeln('TEncoding.GetEncoding( 437).IsSingleByte = ',TEncoding.GetEncoding(437).IsSingleByte);
end.

On my Windows machine it prints:
TEncoding.ANSI.IsSingleByte = FALSE
TEncoding.ANSI.CodePage = 1252
TEncoding.GetEncoding(1252).IsSingleByte = FALSE
TEncoding.GetEncoding( 850).IsSingleByte = FALSE
TEncoding.GetEncoding( 437).IsSingleByte = FALSE

Delhi XE3 reports True for all cases (and prints the same codepage).
Additional InformationConfirmed by marcov on the Dutch Delphi forum.
TagsNo tags attached.
Fixed in Revision43838
FPCOldBugId
FPCTarget3.2.0
Attached Files

Activities

Ondrej Pokorny

2020-01-02 17:52

developer   ~0120185

Please test and close if OK.

Bart Broersma

2020-01-02 20:05

reporter   ~0120187

Fixed.

Issue History

Date Modified Username Field Change
2020-01-02 16:19 Bart Broersma New Issue
2020-01-02 17:19 Ondrej Pokorny Assigned To => Ondrej Pokorny
2020-01-02 17:19 Ondrej Pokorny Status new => assigned
2020-01-02 17:52 Ondrej Pokorny Status assigned => resolved
2020-01-02 17:52 Ondrej Pokorny Resolution open => fixed
2020-01-02 17:52 Ondrej Pokorny Fixed in Version => 3.3.1
2020-01-02 17:52 Ondrej Pokorny Fixed in Revision => 43838
2020-01-02 17:52 Ondrej Pokorny FPCTarget => 3.2.0
2020-01-02 17:52 Ondrej Pokorny Note Added: 0120185
2020-01-02 20:05 Bart Broersma Status resolved => closed
2020-01-02 20:05 Bart Broersma Note Added: 0120187