[Lazarus] How to use strings properly with fixes_1_6 and FPC 3.0.0?

Gabor Boros gaborboros at yahoo.com
Fri Oct 21 11:29:36 CEST 2016


2016. 10. 21. 10:24 keltezéssel, Juha Manninen via Lazarus írta:
> A "character" in Unicode is an ambiguous term.
> Often the good old byte (codeunit) access is very useful.
> See:
>  http://wiki.freepascal.org/UTF8_strings_and_characters

I started with the wiki pages, but 2 about UTF8 in english is too much 
for me and you pointed to a 3rd... :-)

On the above link at "Searching a substring" I read "Due to the special 
nature of UTF8 you can simply use the normal string functions for 
searching a sub-string.". But the example Where procedure returns this 
for me: "The substring "á" is in the text "éáó" at byte position 3 and 
at character position 1". Which incorrect because á is the 2nd character.

Gabor


More information about the Lazarus mailing list