Rookie UTF8 problem lazarus / 8-Other ---------------------------------------------------------------------- Wences · 2009-03-16 01:23 Hi,    I'm trying out Lazarus for the first time and I have a problem with a bit of code that fails, but I don't know why. Here's the code: ------------------- procedure TMainForm.LoadShortcuts(Dir: string; Window: TForm); var   Rslt: TSearchRec;   Attr: Cardinal; begin   Attr := faReadOnly or faHidden or faSysFile or faDirectory or faArchive;   if 0 = FindFirstUTF8(Dir + '*.*', attr, Rslt) then     repeat       Memo1.Lines.Add(AnsiToUTF8(Rslt.Name));     until 0 <> FindNextUTF8(Rslt);   FindCloseUTF8(Rslt);  end; ------------------- Now I'm trying this with a directory (Dir) where there are a few files and a few directories. They all get added to the Memo. The problem is with one directory whose name is in Russian. It shows up as "??????" (Same number of ? as letters in the directory name). I have not checked what happens with files with Russian names. I have tried three variants of this line:       Memo1.Lines.Add(AnsiToUTF8(Rslt.Name));       Memo1.Lines.Add(UTF8ToAnsi(Rslt.Name));       Memo1.Lines.Add(Rslt.Name); but all produce the same result. Some stuff from my about box: Version #: 0.9.27 beta Date: 2009-03-05 FPC Version: 2.2.2 SVN Revision: 18893 i386-win32-win32/win64 Running on WinXP, SP2, in Spanish (But Lazarus set to use English). I know this sounds silly but: I don't know what widgetset I'm using... the default one I guess... This installation of Lazarus is just out of the box. Where do I choose/check widgetset? Any help will be much appreciated. Regards:      Wences