[Lazarus] Beyond Compare 4 built with Lazarus 1.2

Michael Van Canneyt michael at freepascal.org
Sat Dec 28 12:46:47 CET 2013



On Sat, 28 Dec 2013, Jürgen Hestermann wrote:

> Am 2013-12-28 11:20, schrieb Marcos Douglas:
>>> file API for example must be implemented in the frameworks.
>> I think this is an option even in FPC and Lazarus, ie, I see people,
>> on the future, creating your own "RTL" because FPC and Lazarus do not
>> agree about Unicode.  :-)
>
> Yes, I already started building my own file management routines
> mainly because I was never sure about the string encoding/type
> when using the RTL functions.
>
> The current mismanagement regarding strings is a real pain.

There is no mismanagement. The released version is very clear.

The future version (trunk) is not yet clear, but if you are using that,
you should be aware of the risks you decide to take.

We could remove all ansistring support tomorrow, if we felt like it.

> Even when looking into documentation there is no information about
> which string encoding the routines use/need.
> For example, not a single word about string encoding here:
> http://www.freepascal.org/docs-html/rtl/sysutils/findfirst.html

For a simple reason: currently, in the released version of FPC, 
there is no need to document encoding.

The language guide clearly states that in Delphi mode, String = Ansistring.
In ObjFPC mode it is shortstring, unless set to ansistring as well using {$H+}.

So, in both cases 'string' = a single byte string, system codepage.

There is - in the released FPC - no overloaded version with widestrings.

Hence there is no need to document encoding: it is implicit.

As soon as overloaded versions of these functions are released, 
the codepage/encoding issues will be documented.

Michael.


More information about the Lazarus mailing list