fundamentalslib / fundamentals5

Fundamentals 5 Code Library for FreePascal and Delphi

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compiler error - flcUtils.pas(2279): E2003 Undeclared identifier: 'UTF8Char'

edwinyzh opened this issue · comments

Wanted to compile and newly introduced html parser and run flcHTMLTest.pas, but got error as the following:
[dcc32 Error] flcUtils.pas(2279): E2003 Undeclared identifier: 'UTF8Char'

It's XE4 and it does support utf-8 and I can see the following in flcInclude.inc, so not sure why this compilation error happens. I did try manually adding SupportUTF8Char to the newly-created, almost-empty project's Conditional Defines, still getting the same error.
Any hints? Thanks.

{$IFDEF DELPHIXE4_UP}
  {$DEFINE SupportUTF8Char}

BTW, does the parser supports full html5 spec?
does the parsed info contain position info?

Maybe XE4 doesn't declare the UTF8Char type. Try changing the conditional include to:

{$IFDEF DELPHIXE5_UP}
{$DEFINE SupportUTF8Char}

Latest commit should solve this:

82ec6af