(unicodestring mode) AnsiStrings do not carry codepage info
Original Reporter info from Mantis: Thaddy
-
Reporter name: Thaddy de Koning
Original Reporter info from Mantis: Thaddy
- Reporter name: Thaddy de Koning
Description:
Given:
----
{IFDEF FPC}<br/> {MODE DELPHI}
{MODESWITCH UNICODESTRINGS}<br/> {ENDIF}
{$APPTYPE CONSOLE}
uses
sysutils;
var
A: AnsiString;
F: UTF8String;
S: String;
begin
writeln('compiled with '+{$IFDEF FPC}'FPC'{$ELSE}'Delphi'{$ENDIF});
A:= 'Tiburón';
F:= 'Tiburón';
S:= 'Tiburón';
Writeln('AnsiString: ',A,' ',StringCodePage(A));
Writeln('UTF8String: ',F,' ',StringCodePage(F));
Writeln('Default string: ',S,' ',StringCodePage(S));
readln;
end.
-----
Expected output (XE2) is:
compiled with Delphi
AnsiString: Tiburón 1252
UTF8String: Tiburón 65001
Default string: Tiburón 1200
Real output is:
compiled with FPC
AnsiString: Tiburón 0
UTF8String: Tiburón 65001
Default string: Tiburón 1200
Steps to reproduce:
Compile example in Delphi XE2
Compile example with trunk.
Compare output
Mantis conversion info:
- Mantis ID: 21986
- Build: 21254
- Version: 2.7.1