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

Marcos Douglas md at delfire.net
Thu Dec 26 00:23:50 CET 2013


On Wed, Dec 25, 2013 at 7:41 PM, Sven Barth <pascaldragon at googlemail.com> wrote:
> Am 25.12.2013 19:19 schrieb "Marcos Douglas" <md at delfire.net>:
>> > Since that means typically two per target, it was suggested to combine
>> > this
>> > using dotted unit functionality.
>>
>> I did not understand this... dotted unit functionality?
>
> Delphi XE 2 with the introduction of FireMonkey switched from normal unit
> names for the RTL to dotted ones (aka unit namespaces). E.g. SysUtils and
> Classes became System.SysUtils and System.Classes respectively, the Windows
> units moved into a Windows "namespace" (AFAIK) and Forms became VCL.Forms.
> Now the XE2 IDE and command line compiler also provide the possibility to
> specify multiple default namespaces (e.g. a VCL application would have
> System and VCL) to ensure backwards compatibility.

Simple explanation, I understood, thank you.

So the new Delphi "namespace" is virtual (eg: there is no
VCL.Forms.pas file only a Forms.pas) or they have two options, two
files?

If is "virtual" and could be changed in command line compiler, looks
like an ideia that I had (posted on fpc-list) about "namespaces" to
use two units with the same name in the same project. ;-)

> Now the idea is to have dotted units in FPC where String=UnicodeString and
> the legacy non-dotted ones where String=AnsiString. That only leaves out
> Delphi 2009 and XE compatibility (which uses non-dotted UnicodeString
> units), but that's a small price IMHO. Also there are a few further problems
> that need to be tackled with that approach.

I see.
Well, it seems that the way has already been decided and is in development.

Thanks again for the update, in a few words, about the implementations
on the trunk.

Regards,
Marcos Douglas




More information about the Lazarus mailing list