[Lazarus] Beyond Compare 4 built with Lazarus 1.2

Michael Van Canneyt michael at freepascal.org
Sat Dec 28 15:46:48 CET 2013



On Sat, 28 Dec 2013, Marcos Douglas wrote:

> On Sat, Dec 28, 2013 at 11:11 AM, Michael Van Canneyt
> <michael at freepascal.org> wrote:
>>
>>
>> On Sat, 28 Dec 2013, Marcos Douglas wrote:
>>
>>>> That said:
>>>> Nothing stops anyone from implementing a totally separate RTL for FPC.
>>>>
>>>> The number of internal functions that must be implemented for the
>>>> compiler
>>>> to be able to function is rather limited.
>>>>
>>>> If you check the archives, you'll notice that I have often recommended
>>>> people to do so.
>>>
>>>
>>> So you do that, ie, make your own RTL? The major problem is work on
>>> Windows and I don't know if you work it.
>>
>>
>> Why would I ? I don't need it.
>>
>> Frankly, I don't understand what all the fuss is about.
>> Everything is perfectly clear to me, I know how to deal with issues, if they
>> pop up.
>
> So PLEASE, tell us how to make a code on Windows safe, readable and
> strong using FPC 2.6.x (AnsiString) and Lazarus (UTF-8) because I and
> most people still not know.

Only use the lazarus UTF-8 functions.


>
>> Yes, 2.8 or 3.0 will be a big change. They will include a unicode RTL
>> somehow.
>
> Yes. So, how I can protect my code TODAY to the uncertain future?

You can not.

Who said that this was possible ?

>
>> If you work with 2.6.X, there is no problem to understand the RTL:
>> everything is ansistring: Single byte string, system codepage.
>
> I do not have problems to understand that.

No, but you do not seem to accept the consequences of this statement.

Namely: it is NOT possible to use unicode TODAY with the current RTL,
and be future proof at the same time.

>> All the rest is either
>> - People who don't grasp the consequences of the above simple sentence.
>> - People spreading FUD.
>>
>> And yes, I realize that if you really, really need unicode with 2.6.x, you
>> have a problem with the current RTL. No-one ever denied this.
>> At least, the Lazarus team tried to give a workaround with their UTF-8
>> functions.
>
> Yes, yes. I'm not here to complain. I'm here to understand how I can
> solve my problems and, at the same time, help other people. I'm not
> doing FUD.

I didn't say you were.

>
> My questions are simple:
> 1. How can I make programs on Windows using FPC and Lazarus without
> problems with Unicode stuff?

Today, you cannot.

> 2. What I can do now to protect my code for the new FPC
> implementations on the future?

You cannot.

>
>> The FPC team is working on a more fundamental solution. So either be
>> patient, or contact me for instructions on how you can help.
>
> I will be patient... but tell me how I can help anyway.
>
>>
>> But please, Please, PLEASE stop these pointless discussions.
>
> Sorry man, but other people have the same problems. That is real.

Did I ever deny that there are problems ?

I quote myself:
"And yes, I realize that if you really, really need unicode with 2.6.x, you
  have a problem with the current RTL. No-one ever denied this."

When 2.8 arrives, you'll have work to do. 
We'll try to do as much as possible to reduce this by offering you a choice.
But you will have work to do, nothing can protect you from this.

I made the switch from Delphi 7 to Delphi 2010/XE once. 
This was a huge task.

You will just have to try and compile your code with the Unicode RTL, and fix problems as they pop up.
Or stay in AnsiString and workarounds for UTF-8.

Michael.




More information about the Lazarus mailing list