THRIFT-4461 Compiler directive should match Delphi XE4
Client: Delphi
Patch: Anton Shchyrov
diff --git a/lib/delphi/src/Thrift.Utils.pas b/lib/delphi/src/Thrift.Utils.pas
index 89d0211..7e57863 100644
--- a/lib/delphi/src/Thrift.Utils.pas
+++ b/lib/delphi/src/Thrift.Utils.pas
@@ -206,8 +206,12 @@
 
 class function CharUtils.IsHighSurrogate( const c : Char) : Boolean;
 begin
-  {$IF CompilerVersion < 23.0}
-  result := Character.IsHighSurrogate( c);
+  {$IF CompilerVersion < 25.0}
+    {$IFDEF OLD_UNIT_NAMES}
+    result := Character.IsHighSurrogate(c);
+    {$ELSE}
+    result := System.Character.IsHighSurrogate(c);
+    {$ENDIF}
   {$ELSE}
   result := c.IsHighSurrogate();
   {$IFEND}
@@ -216,10 +220,14 @@
 
 class function CharUtils.IsLowSurrogate( const c : Char) : Boolean;
 begin
-  {$IF CompilerVersion < 23.0}
-  result := Character.IsLowSurrogate( c);
+  {$IF CompilerVersion < 25.0}
+    {$IFDEF OLD_UNIT_NAMES}
+    result := Character.IsLowSurrogate(c);
+    {$ELSE}
+    result := System.Character.IsLowSurrogate(c);
+    {$ENDIF}
   {$ELSE}
-  result := c.IsLowSurrogate;
+  result := c.IsLowSurrogate();
   {$IFEND}
 end;