View Issue Details

IDProjectCategoryView StatusLast Update
0033984FPCRTLpublic2018-10-29 13:47
ReporterCyraxAssigned ToMichael Van Canneyt 
PrioritynormalSeverityminorReproducibilityN/A
Status closedResolutionfixed 
PlatformLinux x86_64OSArchOS Version3.17.4-1
Product Version3.1.1Product Buildr39450 
Target Version3.2.0Fixed in Version3.1.1 
Summary0033984: [patch] Fix UnicodeStringReplace function.
DescriptionAttached patch fixes UnicodeStringReplace function so it will give correct result like fixed WideStringReplace in bug report https://bugs.freepascal.org/view.php?id=32649
Tagspatch
Fixed in Revision39452
FPCOldBugId
FPCTarget
Attached Files
  • sysuni.inc.diff (615 bytes)
    diff --git rtl/objpas/sysutils/sysuni.inc rtl/objpas/sysutils/sysuni.inc
    index 27467532e9..59d491fd96 100644
    --- rtl/objpas/sysutils/sysuni.inc
    +++ rtl/objpas/sysutils/sysuni.inc
    @@ -536,9 +536,9 @@ end;
     {$macro on}
     {$define INUNICODESTRINGREPLACE}
     {$define SRString:=UnicodeString}
    -{$define SRUpperCase:=WideUppercase}
    -{$define SRPCHAR:=PChar}
    -{$define SRCHAR:=Char}
    +{$define SRUpperCase:=UnicodeUppercase}
    +{$define SRPCHAR:=PUnicodeChar}
    +{$define SRCHAR:=UnicodeChar}
     
     function UnicodeStringReplace(const S, OldPattern, NewPattern: UnicodeString;  Flags: TReplaceFlags): UnicodeString;
     {$i syssr.inc}
    
    sysuni.inc.diff (615 bytes)

Activities

Cyrax

2018-07-14 13:35

reporter  

sysuni.inc.diff (615 bytes)
diff --git rtl/objpas/sysutils/sysuni.inc rtl/objpas/sysutils/sysuni.inc
index 27467532e9..59d491fd96 100644
--- rtl/objpas/sysutils/sysuni.inc
+++ rtl/objpas/sysutils/sysuni.inc
@@ -536,9 +536,9 @@ end;
 {$macro on}
 {$define INUNICODESTRINGREPLACE}
 {$define SRString:=UnicodeString}
-{$define SRUpperCase:=WideUppercase}
-{$define SRPCHAR:=PChar}
-{$define SRCHAR:=Char}
+{$define SRUpperCase:=UnicodeUppercase}
+{$define SRPCHAR:=PUnicodeChar}
+{$define SRCHAR:=UnicodeChar}
 
 function UnicodeStringReplace(const S, OldPattern, NewPattern: UnicodeString;  Flags: TReplaceFlags): UnicodeString;
 {$i syssr.inc}
sysuni.inc.diff (615 bytes)

Michael Van Canneyt

2018-07-14 18:28

administrator   ~0109456

Applied, thank you for the patch !

Cyrax

2018-10-29 13:47

reporter   ~0111656

Thank you!

Issue History

Date Modified Username Field Change
2018-07-14 13:35 Cyrax New Issue
2018-07-14 13:35 Cyrax File Added: sysuni.inc.diff
2018-07-14 13:38 Cyrax Tag Attached: patch
2018-07-14 18:27 Michael Van Canneyt Assigned To => Michael Van Canneyt
2018-07-14 18:27 Michael Van Canneyt Status new => assigned
2018-07-14 18:28 Michael Van Canneyt Fixed in Revision => 39452
2018-07-14 18:28 Michael Van Canneyt Note Added: 0109456
2018-07-14 18:28 Michael Van Canneyt Status assigned => resolved
2018-07-14 18:28 Michael Van Canneyt Fixed in Version => 3.1.1
2018-07-14 18:28 Michael Van Canneyt Resolution open => fixed
2018-07-14 18:28 Michael Van Canneyt Target Version => 3.2.0
2018-10-29 13:47 Cyrax Note Added: 0111656
2018-10-29 13:47 Cyrax Status resolved => closed