When opened in SynEdit, I convert to WinCPToUTF8, (for Russian language support)
this is not necessary Russian language support, this is your "windows code-page" support.
If you need more reliable way of conversion, you might need to specify the code page explicitly.
Here's an example of using FPC charset conversion tools.
uses
.. cp949, charset; // cp949 - is Korean code page. Charset - is the unit with that provides routines to convert the characters, based on "cp949"
procedure TForm1.FormCreate(Sender: TObject);
var
s: string;
u: WideString;
f: Text;
r: integer;
begin
AssignFile(F,'input.txt'); Reset(f); // this just to load characters from the file. The solution may vary
ReadLn(f, s);
CloseFile(f);
SetLength(u, length(s));
r := getunicode(PChar(s),length(s),getmap(949), tunicodestring(@u[1])); // from "Charset"
SetLength(u, r);
SynEdit1.Text := UTF8Encode(u);
end;
instead of dealing with GetUnicode() function directly, one might use "fpwidestring" wideString manager. But I'm not sure if it's friendly with LCL.