mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-07 05:27:13 +01:00
* set the code page of rawbytestring typed constants to the same value as
when assigning a string constant to a rawbytestring (system code page with
{$modeswitch systemcodepage}, CP_ACP without) (mantis #25332)
git-svn-id: trunk@26397 -
This commit is contained in:
parent
729ac297e4
commit
ffd6a4ea47
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -13757,6 +13757,8 @@ tests/webtbs/tw2525.pp svneol=native#text/plain
|
||||
tests/webtbs/tw25269.pp svneol=native#text/pascal
|
||||
tests/webtbs/tw25289.pp svneol=native#text/plain
|
||||
tests/webtbs/tw25318.pp svneol=native#text/pascal
|
||||
tests/webtbs/tw25332.pp svneol=native#text/plain
|
||||
tests/webtbs/tw25332a.pp svneol=native#text/plain
|
||||
tests/webtbs/tw25349.pp svneol=native#text/plain
|
||||
tests/webtbs/tw2536.pp svneol=native#text/plain
|
||||
tests/webtbs/tw25361.pp svneol=native#text/plain
|
||||
|
||||
@ -455,6 +455,12 @@ function get_next_varsym(def: tabstractrecorddef; const SymList:TFPHashObjectLis
|
||||
begin
|
||||
strlength:=tstringconstnode(node).len;
|
||||
strval:=tstringconstnode(node).value_str;
|
||||
{ the def may have changed from e.g. RawByteString to
|
||||
AnsiString(CP_ACP) }
|
||||
if node.resultdef.typ=stringdef then
|
||||
def:=tstringdef(node.resultdef)
|
||||
else
|
||||
internalerror(2014010501);
|
||||
end
|
||||
else
|
||||
begin
|
||||
|
||||
9
tests/webtbs/tw25332.pp
Normal file
9
tests/webtbs/tw25332.pp
Normal file
@ -0,0 +1,9 @@
|
||||
|
||||
{mode delphiunicode}
|
||||
|
||||
const r: rawbytestring = 'abc';
|
||||
begin
|
||||
if (stringcodepage(r) <> CP_ACP) and
|
||||
(stringcodepage(r) <> DefaultSystemCodePage) then
|
||||
halt(1);
|
||||
end.
|
||||
8
tests/webtbs/tw25332a.pp
Normal file
8
tests/webtbs/tw25332a.pp
Normal file
@ -0,0 +1,8 @@
|
||||
|
||||
{$mode delphiunicode}
|
||||
|
||||
const r: rawbytestring = 'abc';
|
||||
begin
|
||||
if stringcodepage(r) = CP_NONE then
|
||||
halt(1);
|
||||
end.
|
||||
Loading…
Reference in New Issue
Block a user