[Lazarus] ShellExecute and german umlauts
Henry Vermaak
henry.vermaak at gmail.com
Thu May 21 11:37:04 CEST 2015
On Thu, May 21, 2015 at 10:06:28AM +0200, John Landmesser wrote:
> i want to send a mail on windows using shellexecute with german
> Umlauts ( ö,å,ü .. ) in the body of the mail.
>
> This Code doesn't work:
>
> var s: string;
>
> s := 'öööööö'
>
>
> shellexecute(Application.Mainform.handle, 'open',PChar('mailto:' +
> 'example at gmail.com' + '?subject=' + 'ARJ-ChapterArchiv: ' +
> '&body=' + UTF8ToAnsi(s)),nil, nil, sw_normal);
>
> Good tipps are welcome! I don't want to use Indy or synapse!
I use something like this:
if Win32MajorVersion < 5 then
Ret := ShellExecute(0, 'open', PChar(UTF8ToSys(AProg)), nil, nil, SW_SHOWNORMAL)
else
Ret := ShellExecuteW(0, 'open', PWideChar(UTF8Decode(AProg)), nil, nil, SW_SHOWNORMAL);
Result := Ret > 32;
Henry
More information about the Lazarus
mailing list