Re: [fpc-pascal] More help with unicode

2007-11-11 Thread Jonas Maebe
On 10 Nov 2007, at 16:41, Felipe Monteiro de Carvalho wrote: On Nov 10, 2007 4:30 PM, Jonas Maebe <[EMAIL PROTECTED]> wrote: You're making the same error which Marco pointed out earlier: Utf8Decode returns a (reference counted) widestring, but you are not assigning it to anything so it ends u

Re: [fpc-pascal] More help with unicode

2007-11-10 Thread Felipe Monteiro de Carvalho
I now see that I should probably be using SendMessageW, but that didn't make any difference. thanks, -- Felipe Monteiro de Carvalho ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] More help with unicode

2007-11-10 Thread Felipe Monteiro de Carvalho
On Nov 10, 2007 4:30 PM, Jonas Maebe <[EMAIL PROTECTED]> wrote: > You're making the same error which Marco pointed out earlier: > Utf8Decode returns a (reference counted) widestring, but you are not > assigning it to anything so it ends up in a (reusable) temp location. > As soon as the next tempor

Re: [fpc-pascal] More help with unicode

2007-11-10 Thread Jonas Maebe
On 10 Nov 2007, at 16:23, Felipe Monteiro de Carvalho wrote: Which I tryed to convert to: if UnicodeEnabledOS then SendMessage(fHandle, WM_SETTEXT, 0, LPARAM(PWideChar(Utf8Decode(TheText else SendMessage(fHandle, WM_SETTEXT, 0, LPARAM(PChar(Utf8ToAnsi(TheText; But t

[fpc-pascal] More help with unicode

2007-11-10 Thread Felipe Monteiro de Carvalho
Hello, I still have some issues with unicode support =) I am trying to implement unicode support for TMemo, but somehow the solution isn't simple. TMemo will throw a WM_SETTEXT message to when it's text is set, like this: SendMessage(fHandle, WM_SETTEXT, 0, LPARAM(TheText)); Which I tryed t