[fpc-pascal] Help making code unicode capable

Mattias Gaertner nc-gaertnma at netcologne.de
Sat Nov 10 15:54:48 CET 2007


On Sat, 10 Nov 2007 15:44:54 +0100
"Felipe Monteiro de Carvalho" <felipemonteiro.carvalho at gmail.com> wrote:

> Thanks, I arrived at this:
> 
> var
>   FilterBuffer: WideString;
> ...
> 
>       FilterBuffer := Utf8Decode(Filter);
>       lpStrFilter := GetMem(Length(FilterBuffer) * 2 + 2);
>       Move(FilterBuffer, lpStrFilter, Length(FilterBuffer) * 2 + 2);
> 
> But now it crashes when loading the dialog =/
> 
> any ideas?


       Move(FilterBuffer[0], lpStrFilter^, Length(FilterBuffer) * 2 +
2);


Mattias



More information about the fpc-pascal mailing list