Fedkad, you didn't understand what "Ansi" in this function means.
Utf8ToAnsi is a function which converts UTF8 encoded string to "Ansi" encoding, which here actually means to "system code page".
In Windows, there is one ansi code page (really ansi - one byte) which system has as its default one-byte encoding.
In most Linux distors, the "system code page" is utf8.
So, normally, this function has no effect in Linux, it converts utf8 to utf8.
If you have a utf8 string that you should convert to some specific code page, you should use this:
function ConvertToCP1250(const S: RawByteString): RawByteString;
begin
Result := S;
SetCodePage(Result, cp_utf8, False);
SetCodePage(Result, 1250, True);
end;
Of course, replace 1250, with the encoding you actually want.
And you should know to which encoding you want to convert, even in Windows it is bad idea to rely on "system installed" code page.