From 158b6296a4c4cfb38ad39638176159036a31ce01 Mon Sep 17 00:00:00 2001 From: florian Date: Thu, 30 Jul 2009 19:28:55 +0000 Subject: * uncommited stuff for code page aware strings git-svn-id: http://svn.freepascal.org/svn/fpc/branches/cpstr@13478 3ad0048d-3df7-0310-abae-a5850022a9f2 --- compiler/defcmp.pas | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'compiler/defcmp.pas') diff --git a/compiler/defcmp.pas b/compiler/defcmp.pas index 068354da60..bfc445c5a9 100644 --- a/compiler/defcmp.pas +++ b/compiler/defcmp.pas @@ -340,10 +340,14 @@ implementation end; end else - { Same string type, for shortstrings also the length must match } + { same string type ? } if (tstringdef(def_from).stringtype=tstringdef(def_to).stringtype) and + { for shortstrings also the length must match } ((tstringdef(def_from).stringtype<>st_shortstring) or - (tstringdef(def_from).len=tstringdef(def_to).len)) then + (tstringdef(def_from).len=tstringdef(def_to).len)) and + { for ansi- and unicodestrings also the encoding must match } + (not(tstringdef(def_from).stringtype in [st_ansistring,st_unicodestring]) or + (tstringdef(def_from).stringencoding=tstringdef(def_to).stringencoding))then eq:=te_equal else begin -- cgit v1.2.1