[Lazarus] Lazarus (UTF8) and Windows: SysToUTF8, UTF8ToSys... Is there a better solution?

Marcos Douglas md at delfire.net
Sun Dec 15 16:25:18 CET 2013


On Sun, Dec 15, 2013 at 1:08 PM, Bart <bartjunk64 at gmail.com> wrote:
> We have TStringListUtf8 and TFileStreamUTF8 in LazUtf8Classes unit.
>
> Furthermore all file routines in FileUtil and LazFileUtils do all this
> conversion automatically for you. They excpest UTF8 strings as their
> parameters (all LCL strings are UTF8) and (on NT based platforms) use
> WideString API to implement this.
>
> Mutatis mutandis for ParamStrUtf8.
>
> So for basic stuff all this is already taken care of.

Only in Lazarus' context... but I have some components that is only
FPC's context.
These components do not use Lazarus' routines and that is the BIG
problem. I need to "remember" in pass only ANSI strings for these
components as remember to convert the component's output string
results to use in Lazarus.

> As for DLL, ActiveX, well that is platform specific, and you will have
> to convert.

Forget that, this is not a problem. I'm using many DLL and ActiveX and
I know this is not portable... that's Ok. Do not need any conversion.

Thanks,
Marcos Douglas




More information about the Lazarus mailing list