[fpc-pascal] How to know the string type of a variable?

Juha Manninen juha.manninen62 at gmail.com
Mon Dec 30 23:08:46 CET 2013


On Mon, Dec 30, 2013 at 9:17 PM, Mattias Gaertner
<nc-gaertnma at netcologne.de> wrote:
> if FindInvalidUTF8Character(PChar(Pointer(s)),length(s))<0 then
>   // UTF-8

Uhhh! I will be totally screwed when I must do a unicode conversion myself.
What was this "PChar(Pointer(s))" again? PChar is a pointer, why does
it need a double cast?

BTW, IsASCII function does not help here. It only checks the lower ascii area.

Juha



More information about the fpc-pascal mailing list