diff --git a/components/codetools/examples/codecompletion.lpi b/components/codetools/examples/codecompletion.lpi
index fcbba1d9bb..0edfb626f9 100644
--- a/components/codetools/examples/codecompletion.lpi
+++ b/components/codetools/examples/codecompletion.lpi
@@ -6,7 +6,6 @@
-
@@ -35,13 +34,10 @@
-
+
-
-
-
diff --git a/components/codetools/expreval.pas b/components/codetools/expreval.pas
index 6f1a74f86d..4af9de4bf9 100644
--- a/components/codetools/expreval.pas
+++ b/components/codetools/expreval.pas
@@ -344,8 +344,15 @@ begin
ErrorPos:=CurPos;
exit;
end;
- Result:='0';// this can only be answered by a real compiler
- if (not ReadNextAtom) then begin
+ if CompAtom('UNICODESTRING') then begin
+ if IsDefined('FPC_HAS_UNICODESTRING') then
+ Result:='1'
+ else
+ Result:='0';
+ end else begin
+ Result:='0';// this can only be answered by a real compiler
+ end;
+ if (not ReadNextAtom) or (not CompAtom(')')) then begin
ErrorPos:=CurPos;
exit;
end;