How do i properly convert string to unicode? If i normally have for example "äö" characters in filenames my texture loader throws errors.
So i tried to look forums and lazarus helps for info but none to found. Here is what i have so far tried but it is either throwing SIGSEGV or giving string with too many random characters at end
var temp: PWideChar; filename: string;
...
//StringToWideChar(filename,temp,length(filename)+1);
//utf8ToUnicode(temp,length(filename)+1,@filename,length(filename));
temp:=getmem(length(filename)*2);
StringToUnicodeChar(filename,temp,256);