[Lazarus] TProcess, UTF8, Windows

Lukasz Sokol el.es.cr at gmail.com
Mon Apr 16 11:29:23 CEST 2012


On 14/04/2012 14:28, Jürgen Hestermann wrote:

> The problem is that the great advantage of Free Pascal and Lazarus of
> beeing available on multiple platforms has turned into a curse for
> those who work on one platform only. Suddenly they are confronted
> with things they usualy don't need to care about. 

I disagree this is multi-platform vs one-platform problem.

There are countless places where you have to care for the 'type of the string'
you pass around even in Delphi <= Turbo (last version I used) if you have to interface
with external (binary, C) libraries (binary dll's do as they like, 
some WinAPI functions commonly ask for POINTER to a string buffer
and SIZE of it...). FPC/Lazarus handling is no different here - you only did 
not notice that because you did not have to use WinAPI or similar functions directly.

If you are advanced enough or just have to use these, string handling in the
internals becomes suddenly very... simple and negligible. Just use String.
If you need multi-language support, use [multi-byte-encoding-of-choice]String 
or wait till it's folded into String handling somewhere in the future. 
_Keep your choice consistent across your project_ no matter what you decide later.

> And if in this
> situation the documentation is poor it becomes a real challenge to
> fight all these nasty little things instead of coding the program
> logic.

Programs := Algorithms[Logic] and Data Structures;

L.





More information about the Lazarus mailing list