On Mon, Dec 30, 2013 at 2:19 PM, Juha Manninen <juha.mannine...@gmail.com> wrote: > On Mon, Dec 30, 2013 at 2:35 PM, Marcos Douglas <m...@delfire.net> wrote: >> Is possible to know what string type of a variable (AnsiString, >> UTF8String, RawByteString, etc)? > > When UTF-8 encoded string is stored in AnsiString (as in LCL), this > test should tell you if it actually is UTF-8 string: > if Length(s) <> UTF8Length(s) then > begin > // UTF-8 > end; > > It should allow a mixture of ansi- and UTF-8 strings in your data.
That is a good tip. LazUTF8 unit have the IsASCII function (not public) too. Thanks, Marcos Douglas _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal