2009/12/18 Manuel Galeote <[email protected]>:
> In windows 7 I’m trying to open a word document with the uses windows and
> shellExecute (lazarus 0.29 fpc 2.5.1)
>
>
>
> That work:
>
> ShellExecute(0, nil, PChar('C: \abc.doc'),nil,nil,SW_SHOWNORMAL);
>
>
>
> But that not work:
>
> ShellExecute(0, nil, PChar('C: \abcó.doc'),nil,nil,SW_SHOWNORMAL); (take a
> look at the final ó)
>
>
>
> Anybody knows why and/or how can I execute that?
>
You should use ShellExecuteW():
ShellExecuteW(0, nil, UTF8toUTF16('C:\abcó.doc'),nil,nil,SW_SHOWNORMAL)
I assume your string is in utf8. If not convert it to UTF16 somehow.
--
cobines
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus