<div dir="auto"><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">Alexey Tor. <<a href="mailto:aaa5500@ya.ru">aaa5500@ya.ru</a>> schrieb am Di., 28. Mai 2019, 14:44:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Ok, I got it. But I wonder: if my code changes codepage of a "string" to <br>
e.g. 1250, will all Lazarus string functions work ok with such changed <br>
string? For ex, will Pos('Петя', s) work?<br></blockquote></div><div dir="auto"><br></div><div dir="auto">Depends on what you do with the returned value. Lazarus uses UTF-8 by default, thus the constant would be in UTF-8 as well and Pos() takes two AnsiString parameters, thus CP_ACP. So the constant is passed along as is and s is converted to UTF-8. Depending on the encoding of the characters you might get a different position, thus you should ensure that both of your strings have the same type (not tested) or you should work simply in UTF-8 and only convert for input/output purposes. </div><div dir="auto"><br></div><div dir="auto">Regards, </div><div dir="auto">Sven </div><div class="gmail_quote" dir="auto"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote></div></div>