On Thu, 13 Aug 2015 14:53:50 +0200 Jürgen Hestermann <[email protected]> wrote:
>[...] > If I am right (after a quick look) then UTF8CharacterStrictLength gives back 0 > in cases where UTF8CharacterLength would give back 1. Yes. > IMO this does not change the underlying problem that if you have an invalid > UTF-8 > string then you cannot fix this situation within functions like > UTF8CharacterLength > or UTF8CharacterStrictLength. They should not fix it. If you want to fix a string you can use the UTF8FixBroken function. > There is no way around it other than: > > 1.) Make sure your strings are all valid UTF-8 or > 2.) Do error checking and error handling in your program yourself 3.) Skip invalid chars. Mattias -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
