On Thu, 20 Dec 2012 09:24:20 +0100
Krzysztof <[email protected]> wrote:

> Hi,
> 
> I have file "01 Amassakoul 'N'Ténéré.mp3" (don't know what language it
> is)
> 
> This code work on linux:
> 
>   if OpenDialog1.Execute then
>   begin
>     ShowMessage(GuessEncoding(OpenDialog1.FileName));
>     f := TFileStream.Create(OpenDialog1.FileName,fmOpenRead);
>     try
> 
>     finally
>       f.Free;
>     end;
>   end;
> 
> But on windows I get error "Unable to open file....". GuessEncoding return
> "UTF8" so I tried to convert it by UTF8ToSys, UTF8ToCP1252 but same error.
> I read http://wiki.freepascal.org/LCL_Unicode_Support but have no idea what
> to do

Instead of TFileStream try using TFileStreamUTF8 of unit lazutf8classes.

Mattias

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to