mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 15:29:23 +02:00
* convert unicode/widestring constants to ansistring in resourcestring
declarations (mantis #25198) git-svn-id: trunk@25807 -
This commit is contained in:
parent
9be15583af
commit
8dd956cbde
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -13621,6 +13621,7 @@ tests/webtbs/tw25077.pp svneol=native#text/pascal
|
|||||||
tests/webtbs/tw25081.pp svneol=native#text/pascal
|
tests/webtbs/tw25081.pp svneol=native#text/pascal
|
||||||
tests/webtbs/tw25101.pp svneol=native#text/pascal
|
tests/webtbs/tw25101.pp svneol=native#text/pascal
|
||||||
tests/webtbs/tw2514.pp svneol=native#text/plain
|
tests/webtbs/tw2514.pp svneol=native#text/plain
|
||||||
|
tests/webtbs/tw25198.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw2525.pp svneol=native#text/plain
|
tests/webtbs/tw2525.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw2536.pp svneol=native#text/plain
|
tests/webtbs/tw2536.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw2540.pp svneol=native#text/plain
|
tests/webtbs/tw2540.pp svneol=native#text/plain
|
||||||
|
@ -956,6 +956,9 @@ implementation
|
|||||||
stringconstn:
|
stringconstn:
|
||||||
with Tstringconstnode(p) do
|
with Tstringconstnode(p) do
|
||||||
begin
|
begin
|
||||||
|
{ resourcestrings are currently always single byte }
|
||||||
|
if cst_type in [cst_widestring,cst_unicodestring] then
|
||||||
|
changestringtype(getansistringdef);
|
||||||
getmem(sp,len+1);
|
getmem(sp,len+1);
|
||||||
move(value_str^,sp^,len+1);
|
move(value_str^,sp^,len+1);
|
||||||
sym:=tconstsym.create_string(orgname,constresourcestring,sp,len,nil);
|
sym:=tconstsym.create_string(orgname,constresourcestring,sp,len,nil);
|
||||||
|
22
tests/webtbs/tw25198.pp
Normal file
22
tests/webtbs/tw25198.pp
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
program concatenate_resourestrings_delphiunicode;
|
||||||
|
|
||||||
|
{$mode delphiunicode}
|
||||||
|
{$codepage cp1250}
|
||||||
|
|
||||||
|
{$ifdef unix}
|
||||||
|
uses
|
||||||
|
cwstring;
|
||||||
|
{$endif}
|
||||||
|
|
||||||
|
resourcestring
|
||||||
|
res2 = 'žlu<6C>ouèký ' + 'koníèek';
|
||||||
|
|
||||||
|
type
|
||||||
|
tstr1250 = type ansistring(1250);
|
||||||
|
var
|
||||||
|
str1250: tstr1250;
|
||||||
|
begin
|
||||||
|
str1250 := 'žlu<6C>ouèký ' + 'koníèek';
|
||||||
|
if res2<>str1250 then
|
||||||
|
halt(1);
|
||||||
|
end.
|
Loading…
Reference in New Issue
Block a user