In a plain fpc (console) program, string is AnsiString(CP_ACP), so it has the codepage of your system.
In Lazarus the strings codepage is CP_UTF8.
So if the databse returns UTF8, all will be fine.
If it returns UTF16, it'll be converted to UTF8 and you're fine.
In plain fpc, you'll have to cater for that yourself.
So, you need to know what codepage the databse returns and set the codepage of your strings accordingly.
Bart