Re: [Lazarus] Unicode branch

2013-07-02 Thread Graeme Geldenhuys
On 2013-07-02 15:55, Marco van de Voort wrote: > Then when you got into trouble, your testsuite revealed this problem > immediately? Yes it did, and I promptly reported it to FPC. Somehow I thought [at the time] FPC was "delphi compatible", as advertised. But I quickly learned that "delphi compa

Re: [Lazarus] Unicode branch

2013-07-02 Thread Marco van de Voort
On Mon, Jul 01, 2013 at 01:09:39PM +0100, Graeme Geldenhuys wrote: > On 30/06/13 23:33, Hans-Peter Diettrich wrote: > > > > Such coding style is asking for trouble :-( > Hardly, but maybe our advanced applications and coding has moved past > your level of knowledge of the language. No, abusing n

Re: [Lazarus] Unicode branch

2013-07-01 Thread Benito van der Zander
That would be much clearer to use, if Pascal had scope local variables and auto created stack objects: begin var x: SetBusyMouseCursorObject; end; That would also make the ref-counted classes at language level unnecessary, because you could just use type TObjectWithRefCounting=

Re: [Lazarus] Unicode branch

2013-07-01 Thread Graeme Geldenhuys
On 30/06/13 23:33, Hans-Peter Diettrich wrote: > > Such coding style is asking for trouble :-( Hardly, but maybe our advanced applications and coding has moved past your level of knowledge of the language. That doesn't make us wrong or "asking for trouble". G. -- __

Re: [Lazarus] Unicode branch

2013-07-01 Thread Graeme Geldenhuys
On 01/07/13 05:36, Martin Schreiber wrote: >> > Working with autodestroyed objects is asking for trouble. ;-) +1 :) Regards, - Graeme - -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/li

Re: [Lazarus] Unicode branch

2013-07-01 Thread Michael Schnell
On 06/30/2013 08:14 PM, Florian Klämpfl wrote: It matters when people make assumptions when the a temp. If an interface indeed is used as an "interface" externally of the program, Destroying it might result in a crash when the external program writes something back to the interface object (b

Re: [Lazarus] Unicode branch

2013-06-30 Thread Martin Schreiber
On Monday 01 July 2013 00:33:43 Hans-Peter Diettrich wrote: > Graeme Geldenhuys schrieb: > > On 2013-06-30 17:25, Hans-Peter Diettrich wrote: > >> I'm somewhat confused now. When an object has an definite "last use", it > >> should not matter when it is destroyed afterwards, sooner or later. > > >

Re: [Lazarus] Unicode branch

2013-06-30 Thread Hans-Peter Diettrich
Florian Klämpfl schrieb: Am 30.06.2013 18:25, schrieb Hans-Peter Diettrich: Marco van de Voort schrieb: On Sat, Jun 29, 2013 at 08:47:37PM -0400, waldo kitty wrote: (Some versions of?) Delphi deallocate interfaces at the end of a block of procedures, not immediately after first usage. first u

Re: [Lazarus] Unicode branch

2013-06-30 Thread Hans-Peter Diettrich
Graeme Geldenhuys schrieb: On 2013-06-30 17:25, Hans-Peter Diettrich wrote: I'm somewhat confused now. When an object has an definite "last use", it should not matter when it is destroyed afterwards, sooner or later. The simplest example... You have code that executes when the Interface gets

Re: [Lazarus] Unicode branch

2013-06-30 Thread Graeme Geldenhuys
On 2013-06-30 17:25, Hans-Peter Diettrich wrote: > I'm somewhat confused now. When an object has an definite "last use", it > should not matter when it is destroyed afterwards, sooner or later. The simplest example... You have code that executes when the Interface gets destroyed. A very simple e

Re: [Lazarus] Unicode branch

2013-06-30 Thread Graeme Geldenhuys
On 2013-06-30 19:14, Florian Klämpfl wrote: > > It matters when people make assumptions when the a temp. Yes, people like Embarcadero themselves (even though it is not officially documented), or Embarcadero partners that ship products with Delphi (think Raize's CodeSite etc). I seriously doubt E

Re: [Lazarus] Unicode branch

2013-06-30 Thread Florian Klämpfl
Am 30.06.2013 18:25, schrieb Hans-Peter Diettrich: > Marco van de Voort schrieb: >> On Sat, Jun 29, 2013 at 08:47:37PM -0400, waldo kitty wrote: (Some versions of?) Delphi deallocate interfaces at the end of a block of procedures, not immediately after first usage. >>> first usage or

Re: [Lazarus] Unicode branch

2013-06-30 Thread Flávio Etrusco
On Sat, Jun 29, 2013 at 4:43 PM, Marcos Douglas wrote: > On Fri, Jun 28, 2013 at 1:07 PM, Hans-Peter Diettrich > wrote: >> Graeme Geldenhuys schrieb: >> >>> On 2013-06-27 21:32, Hans-Peter Diettrich wrote: I don't see how this is related to managed objects. >>> >>> >>> If FPC implements

Re: [Lazarus] Unicode branch

2013-06-30 Thread Hans-Peter Diettrich
Marco van de Voort schrieb: On Sat, Jun 29, 2013 at 08:47:37PM -0400, waldo kitty wrote: (Some versions of?) Delphi deallocate interfaces at the end of a block of procedures, not immediately after first usage. first usage or last usage? Last usage of course, sorry. I'm somewhat confused now

Re: [Lazarus] Unicode branch

2013-06-30 Thread Marco van de Voort
On Sat, Jun 29, 2013 at 08:47:37PM -0400, waldo kitty wrote: > > (Some versions of?) Delphi deallocate interfaces at the end of a block of > > procedures, not immediately after first usage. > > first usage or last usage? Last usage of course, sorry. -- _

Re: [Lazarus] Unicode branch

2013-06-29 Thread waldo kitty
On 6/29/2013 14:51, Marco van de Voort wrote: On Sat, Jun 29, 2013 at 12:14:35AM +0200, Hans-Peter Diettrich wrote: There won't be any exact Delphi like implementation, because like with interfaces it isn't documented _when exactly_ the reference count is decreased. It is decreased whenever a

Re: [Lazarus] Unicode branch

2013-06-29 Thread Marcos Douglas
On Fri, Jun 28, 2013 at 1:07 PM, Hans-Peter Diettrich wrote: > Graeme Geldenhuys schrieb: > >> On 2013-06-27 21:32, Hans-Peter Diettrich wrote: >>> >>> I don't see how this is related to managed objects. >> >> >> If FPC implements managed objects, is it going to behave _exactly_ like >> Delphi, or

Re: [Lazarus] Unicode branch

2013-06-29 Thread Marco van de Voort
On Sat, Jun 29, 2013 at 12:14:35AM +0200, Hans-Peter Diettrich wrote: > > There won't be any exact Delphi like implementation, because like with > > interfaces it isn't documented _when exactly_ the reference count is > > decreased. > > It is decreased whenever a reference expires. Where do you

Re: [Lazarus] Unicode branch

2013-06-29 Thread Sven Barth
On 29.06.2013 00:14, Hans-Peter Diettrich wrote: Sven Barth schrieb: On 28.06.2013 16:49, Graeme Geldenhuys wrote: On 2013-06-27 21:32, Hans-Peter Diettrich wrote: I don't see how this is related to managed objects. If FPC implements managed objects, is it going to behave _exactly_ like Delp

Re: [Lazarus] Unicode branch

2013-06-28 Thread Hans-Peter Diettrich
Sven Barth schrieb: On 28.06.2013 16:49, Graeme Geldenhuys wrote: On 2013-06-27 21:32, Hans-Peter Diettrich wrote: I don't see how this is related to managed objects. If FPC implements managed objects, is it going to behave _exactly_ like Delphi, or slightly different to Delphi - like what ha

Re: [Lazarus] Unicode branch

2013-06-28 Thread Hans-Peter Diettrich
Graeme Geldenhuys schrieb: On 2013-06-27 21:32, Hans-Peter Diettrich wrote: I don't see how this is related to managed objects. If FPC implements managed objects, is it going to behave _exactly_ like Delphi, or slightly different to Delphi - like what happened to the Interfaces implementation.

Re: [Lazarus] Unicode branch

2013-06-28 Thread Marco van de Voort
On Thu, Jun 27, 2013 at 02:58:15PM +0200, Hans-Peter Diettrich wrote: > > Java and C# don't count, as safe languages, they have _ONLY_ managed types. > > Their choices will be hard to backport. > > Right. The idea sounds to me like the other half-baked attempts to > introduce anonymous methods, c

Re: [Lazarus] Unicode branch

2013-06-28 Thread Sven Barth
On 28.06.2013 16:49, Graeme Geldenhuys wrote: On 2013-06-27 21:32, Hans-Peter Diettrich wrote: I don't see how this is related to managed objects. If FPC implements managed objects, is it going to behave _exactly_ like Delphi, or slightly different to Delphi - like what happened to the Interfa

Re: [Lazarus] Unicode branch

2013-06-28 Thread Graeme Geldenhuys
On 2013-06-27 21:32, Hans-Peter Diettrich wrote: > I don't see how this is related to managed objects. If FPC implements managed objects, is it going to behave _exactly_ like Delphi, or slightly different to Delphi - like what happened to the Interfaces implementation. Regards, - Graeme - --

Re: [Lazarus] Unicode branch

2013-06-27 Thread Hans-Peter Diettrich
Graeme Geldenhuys schrieb: On 2013-06-27 11:45, Hans-Peter Diettrich wrote: Automatic reference counting works pretty well, doing it manually is asking for trouble. Sometimes it becomes trick (at least with reference counted interfaces). eg: I have code where I pass a interface around, but don

Re: [Lazarus] Unicode branch

2013-06-27 Thread Sven Barth
Am 27.06.2013 22:11 schrieb "Hans-Peter Diettrich" : > > Marco van de Voort schrieb: > >> On Wed, Jun 26, 2013 at 05:59:06PM +0200, Hans-Peter Diettrich wrote: Yeah, that change is going to be a nightmare to lots of existing code. I hope Delphi developers enjoy debugging! >>> >>> I d

Re: [Lazarus] Unicode branch

2013-06-27 Thread Hans-Peter Diettrich
Marco van de Voort schrieb: On Wed, Jun 26, 2013 at 05:59:06PM +0200, Hans-Peter Diettrich wrote: Yeah, that change is going to be a nightmare to lots of existing code. I hope Delphi developers enjoy debugging! I don't see any relationship to COM here. Java has managed objects, C++ has, .NET ha

Re: [Lazarus] Unicode branch

2013-06-27 Thread Graeme Geldenhuys
On 2013-06-27 11:45, Hans-Peter Diettrich wrote: > > Automatic reference counting works pretty well, doing it manually is > asking for trouble. Sometimes it becomes trick (at least with reference counted interfaces). eg: I have code where I pass a interface around, but don't want the reference c

Re: [Lazarus] Unicode branch

2013-06-27 Thread Hans-Peter Diettrich
Graeme Geldenhuys schrieb: On 2013-06-26 16:59, Hans-Peter Diettrich wrote: I don't see any relationship to COM here. Java has managed objects, C++ has, .NET has, so why not OPL too? I wasn't referring to COM explicitly. But having objects being freed when the developer didn't expect it (beca

Re: [Lazarus] Unicode branch

2013-06-27 Thread Michael Schnell
On 06/26/2013 05:59 PM, Hans-Peter Diettrich wrote: I don't see any relationship to COM here. Delphi "interfaces" mostly are seen as COM thingies, even though they are just straight forward language constructs that _can_ be used to attach to COM objects. but they can be happily be used for o

Re: [Lazarus] Unicode branch

2013-06-27 Thread Marco van de Voort
On Wed, Jun 26, 2013 at 09:12:42AM +0200, Michael Schnell wrote: > On 06/25/2013 03:16 PM, Marco van de Voort wrote: > > As far as I know that was all to be limited to their mobile offering. > As stated earlier by several contributors, splitting the language into > two separate branches for differ

Re: [Lazarus] Unicode branch

2013-06-27 Thread Marco van de Voort
On Wed, Jun 26, 2013 at 05:59:06PM +0200, Hans-Peter Diettrich wrote: > > Yeah, that change is going to be a nightmare to lots of existing code. I > > hope Delphi developers enjoy debugging! > > I don't see any relationship to COM here. Java has managed objects, C++ > has, .NET has, so why not OP

Re: [Lazarus] Unicode branch

2013-06-27 Thread Graeme Geldenhuys
On 2013-06-26 16:59, Hans-Peter Diettrich wrote: > I don't see any relationship to COM here. Java has managed objects, C++ > has, .NET has, so why not OPL too? I wasn't referring to COM explicitly. But having objects being freed when the developer didn't expect it (because that was not the behav

Re: [Lazarus] Unicode branch

2013-06-26 Thread Hans-Peter Diettrich
Graeme Geldenhuys schrieb: On 26/06/13 07:19, Martin Schreiber wrote: Because then classes work like COM interfaces. Shudder. Yeah, that change is going to be a nightmare to lots of existing code. I hope Delphi developers enjoy debugging! I don't see any relationship to COM here. Java has m

Re: [Lazarus] Unicode branch

2013-06-26 Thread Sven Barth
Am 26.06.2013 09:08, schrieb Michael Schnell: On 06/25/2013 03:14 PM, Sven Barth wrote: Yes, it will merely be an empty method then. If this really works and does not break anything, I wonder why this has not been implemented since long... There can be problems where the reference counting mech

Re: [Lazarus] Unicode branch

2013-06-26 Thread Graeme Geldenhuys
On 26/06/13 07:19, Martin Schreiber wrote: >> > Because then classes work like COM interfaces. Shudder. Yeah, that change is going to be a nightmare to lots of existing code. I hope Delphi developers enjoy debugging! Regards, - Graeme - -- ___ Laz

Re: [Lazarus] Unicode branch

2013-06-26 Thread Martin Schreiber
Am 26.06.2013 08:08, schrieb Michael Schnell: On 06/25/2013 03:14 PM, Sven Barth wrote: Yes, it will merely be an empty method then. If this really works and does not break anything, I wonder why this has not been implemented since long... Because then classes work like COM interfaces. Shudde

Re: [Lazarus] Unicode branch

2013-06-26 Thread Michael Schnell
On 06/25/2013 03:16 PM, Marco van de Voort wrote: As far as I know that was all to be limited to their mobile offering. As stated earlier by several contributors, splitting the language into two separate branches for different architectures seems like an utterly bad idea. I do hope Lazarus will

Re: [Lazarus] Unicode branch

2013-06-25 Thread Michael Schnell
On 06/25/2013 03:14 PM, Sven Barth wrote: Yes, it will merely be an empty method then. If this really works and does not break anything, I wonder why this has not been implemented since long... -Michael -- ___ Lazarus mailing list Lazarus@lists.laza

Re: [Lazarus] Unicode branch

2013-06-25 Thread Marco van de Voort
On Thu, Jun 20, 2013 at 01:48:00PM +0200, Vincent Snijders wrote: > > To build a 2-byte windows unit (and the new RTL), > > > > 1) checkout fpc/branches/unicode > > 2) do a make cycle to get a fresh 2.7.1 > > > I did a make all at the top level directory, which ignores my fpc.cfg > (good) and calls

Re: [Lazarus] Unicode branch

2013-06-25 Thread Marco van de Voort
On Tue, Jun 25, 2013 at 09:23:14AM +0100, Graeme Geldenhuys wrote: > So what platforms with the nextgen compiler target? OS X, iOS, Android, > Windows Phone, Linux? All but Windows? There is a note in the XE4 related documentation, that desktop Delphi/nextgen will be compatible with the current si

Re: [Lazarus] Unicode branch

2013-06-25 Thread Marco van de Voort
On Mon, Jun 24, 2013 at 04:59:13PM +0200, Michael Schnell wrote: > I just have been told that Embarcadero plans to do away with the stuff > fpc is just implementing in the "Unicode branch" and is on the verge to > change to a completely new String type that is > - UTF-16-only, > - Zero-Based,

Re: [Lazarus] Unicode branch

2013-06-25 Thread Sven Barth
Am 25.06.2013 11:04, schrieb Michael Schnell: On 06/24/2013 05:14 PM, Hans-Peter Diettrich wrote: They also make TObject reference counted... I did read about this. So ".Free" is going to be obsolete ? Yes, it will merely be an empty method then. Regards, Sven -- ___

Re: [Lazarus] Unicode branch

2013-06-25 Thread Hans-Peter Diettrich
Felipe Monteiro de Carvalho schrieb: On Mon, Jun 24, 2013 at 5:14 PM, Hans-Peter Diettrich wrote: I just have been told that Embarcadero plans to do away with the stuff fpc is just implementing in the "Unicode branch" and is on the verge to change to a completely new String type that is - UTF-

Re: [Lazarus] Unicode branch

2013-06-25 Thread Michael Schnell
On 06/24/2013 09:25 PM, Michael Van Canneyt wrote: AFAIK This is only for the new nextgen compiler, for the Win32 target, nothing changes. To me it makes absolutely no sense to force the programmers to use different paradigms for different platforms. A decent programming system should hide

Re: [Lazarus] Unicode branch

2013-06-25 Thread Michael Schnell
On 06/24/2013 05:14 PM, Hans-Peter Diettrich wrote: They also make TObject reference counted... I did read about this. So ".Free" is going to be obsolete ? When we can start implementing further changes, we should look whether Delphi exists at all, at that time. I wouldn't hold my breath ;-)

Re: [Lazarus] Unicode branch

2013-06-25 Thread Graeme Geldenhuys
On 2013-06-24 20:25, Michael Van Canneyt wrote: > > AFAIK This is only for the new nextgen compiler, for the Win32 target, > nothing changes. When you say Win32 do you mean Windows (as in 32 & 64-bit) or only 32-bit Windows? So what platforms with the nextgen compiler target? OS X, iOS, Androi

Re: [Lazarus] Unicode branch

2013-06-24 Thread Felipe Monteiro de Carvalho
On Mon, Jun 24, 2013 at 5:14 PM, Hans-Peter Diettrich wrote: >> I just have been told that Embarcadero plans to do away with the stuff fpc >> is just implementing in the "Unicode branch" and is on the verge to change >> to a completely new String type that is >> - UTF-16-only, >> - Zero-Based, a

Re: [Lazarus] Unicode branch

2013-06-24 Thread Michael Van Canneyt
On Mon, 24 Jun 2013, Michael Schnell wrote: I just have been told that Embarcadero plans to do away with the stuff fpc is just implementing in the "Unicode branch" and is on the verge to change to a completely new String type that is - UTF-16-only, - Zero-Based, and - immutable. And thus com

Re: [Lazarus] Unicode branch

2013-06-24 Thread Florian Klämpfl
Am 24.06.2013 16:59, schrieb Michael Schnell: > I just have been told that Embarcadero plans to do away with the stuff > fpc is just implementing in the "Unicode branch" and is on the verge to > change to a completely new String type that is > - UTF-16-only, > - Zero-Based, and > - immutable. >

Re: [Lazarus] Unicode branch

2013-06-24 Thread Curt Carpenter
For the very little that it's worth, I abandoned Delphi (10) because I was sick of Embarcadero's approach to strings at that time, which forced a rework of *a lot* of my old code and components. Adopted Lazarus and never looked back. On 6/24/2013 10:14 AM, Hans-Peter Diettrich wrote: Michael

Re: [Lazarus] Unicode branch

2013-06-24 Thread Hans-Peter Diettrich
Michael Schnell schrieb: I just have been told that Embarcadero plans to do away with the stuff fpc is just implementing in the "Unicode branch" and is on the verge to change to a completely new String type that is - UTF-16-only, - Zero-Based, and - immutable. And thus completely incompatibl

Re: [Lazarus] Unicode branch

2013-06-24 Thread Michael Schnell
I just have been told that Embarcadero plans to do away with the stuff fpc is just implementing in the "Unicode branch" and is on the verge to change to a completely new String type that is - UTF-16-only, - Zero-Based, and - immutable. And thus completely incompatible with any "String" Type e

Re: [Lazarus] Unicode branch

2013-06-20 Thread Vincent Snijders
2013/6/8 Marco van de Voort > > To build a 2-byte windows unit (and the new RTL), > > 1) checkout fpc/branches/unicode > 2) do a make cycle to get a fresh 2.7.1 > I did a make all at the top level directory, which ignores my fpc.cfg (good) and calls make cycle in the compiler dir (good). It fail

Re: [Lazarus] Unicode branch

2013-06-13 Thread Sven Barth
Am 13.06.2013 21:23, schrieb Michael Van Canneyt: On Thu, 13 Jun 2013, Marco van de Voort wrote: On Thu, Jun 13, 2013 at 11:51:38AM +0200, Michael Van Canneyt wrote: The problem is not in the compiler. The problem is that IF your code assumes that WideString=UnicodeString That is Delphi i

Re: [Lazarus] Unicode branch

2013-06-13 Thread Marco van de Voort
On Thu, Jun 13, 2013 at 09:23:59PM +0200, Michael Van Canneyt wrote: > >> The problem is not in the compiler. > >> The problem is that IF your code assumes that WideString=UnicodeString > > > > That is Delphi incompatble. Simply don't enable Delphi compatibility mode > > then. > > Which Delphi ver

Re: [Lazarus] Unicode branch

2013-06-13 Thread Michael Van Canneyt
On Thu, 13 Jun 2013, Marco van de Voort wrote: On Thu, Jun 13, 2013 at 11:51:38AM +0200, Michael Van Canneyt wrote: The problem is not in the compiler. The problem is that IF your code assumes that WideString=UnicodeString That is Delphi incompatble. Simply don't enable Delphi compatibilit

Re: [Lazarus] Unicode branch

2013-06-13 Thread Michael Van Canneyt
On Thu, 13 Jun 2013, Marco van de Voort wrote: On Thu, Jun 13, 2013 at 11:32:36AM +0200, Michael Van Canneyt wrote: ObjFPC was encountered) and I added the FPC_OS_UNICODE define. All the more reason not to try to emulate Delphi defines. Why? We define "Windows" and "MSWindows" too? Maybe

Re: [Lazarus] Unicode branch

2013-06-13 Thread Marco van de Voort
On Thu, Jun 13, 2013 at 11:32:36AM +0200, Michael Van Canneyt wrote: > > ObjFPC was encountered) and I added the FPC_OS_UNICODE define. > > All the more reason not to try to emulate Delphi defines. Why? We define "Windows" and "MSWindows" too? Maybe not use "linux" because Kylix does ? :-) > UNI

Re: [Lazarus] Unicode branch

2013-06-13 Thread Marco van de Voort
On Thu, Jun 13, 2013 at 11:51:38AM +0200, Michael Van Canneyt wrote: > > The problem is not in the compiler. > The problem is that IF your code assumes that WideString=UnicodeString That is Delphi incompatble. Simply don't enable Delphi compatibility mode then. -- _

Re: [Lazarus] Unicode branch

2013-06-13 Thread Michael Schnell
On 06/13/2013 11:51 AM, Michael Van Canneyt wrote: The problem is not in the compiler. The problem is that IF your code assumes that WideString=UnicodeString then you will need to differentiate the 2 cases. I suppose you are correct. But if I understand correctly what my Delphi addicted col

Re: [Lazarus] Unicode branch

2013-06-13 Thread Sven Barth
Am 13.06.2013 11:32, schrieb Michael Van Canneyt: On Thu, 13 Jun 2013, Sven Barth wrote: Am 12.06.2013 17:36, schrieb Michael Van Canneyt: On Wed, 12 Jun 2013, Marco van de Voort wrote: On Wed, Jun 12, 2013 at 10:55:24AM +0200, Michael Schnell wrote: On 06/10/2013 08:55 AM, Michael Van

Re: [Lazarus] Unicode branch

2013-06-13 Thread Michael Van Canneyt
On Thu, 13 Jun 2013, Michael Schnell wrote: On 06/13/2013 11:32 AM, Michael Van Canneyt wrote: And they'll need defines anyway because widestring <> unicodestring on windows. The compiler does know whether it compiles for Windows or not. Doesn't it ? The problem is not in the compiler.

Re: [Lazarus] Unicode branch

2013-06-13 Thread Michael Schnell
On 06/13/2013 11:32 AM, Michael Van Canneyt wrote: And they'll need defines anyway because widestring <> unicodestring on windows. The compiler does know whether it compiles for Windows or not. Doesn't it ? -Michael -- ___ Lazarus mailing list La

Re: [Lazarus] Unicode branch

2013-06-13 Thread Michael Van Canneyt
On Thu, 13 Jun 2013, Sven Barth wrote: Am 12.06.2013 17:36, schrieb Michael Van Canneyt: On Wed, 12 Jun 2013, Marco van de Voort wrote: On Wed, Jun 12, 2013 at 10:55:24AM +0200, Michael Schnell wrote: On 06/10/2013 08:55 AM, Michael Van Canneyt wrote: Where is UNICODE defined ? Isn'

Re: [Lazarus] Unicode branch

2013-06-13 Thread Sven Barth
Am 12.06.2013 17:36, schrieb Michael Van Canneyt: On Wed, 12 Jun 2013, Marco van de Voort wrote: On Wed, Jun 12, 2013 at 10:55:24AM +0200, Michael Schnell wrote: On 06/10/2013 08:55 AM, Michael Van Canneyt wrote: Where is UNICODE defined ? Isn't the define "UNICODE" a heritage from Delp

Re: [Lazarus] Unicode branch

2013-06-13 Thread Michael Schnell
On 06/12/2013 05:31 PM, Marco van de Voort wrote: No. This is part of that, but only the most initial level. Much is not yet decided. ... including how compatible it will be. (and more importantly, how portable the compatibility will be) As I followed (an took part in) several discussions on t

Re: [Lazarus] Unicode branch

2013-06-13 Thread Michael Schnell
On 06/12/2013 05:36 PM, Michael Van Canneyt wrote: Now why on earth would we do that ? We don't define VERXYZ either in mode delphi ?? As, String-wise, Delphi (as of version xyz) is not compatible to itself, IMHO it does make perfect sense to provide the $mode delphiunicode, additional to

Re: [Lazarus] Unicode branch

2013-06-13 Thread Michael Schnell
On 06/12/2013 05:29 PM, Marco van de Voort wrote: Yes, and if you chose the explicit compatibility mode for that version, $mode delphiunicode, it _is_ defined. Great. I see my concerns about this kind of compatibility seem already to be cared for. Thanks ! -Michael --

Re: [Lazarus] Unicode branch

2013-06-12 Thread Michael Van Canneyt
On Wed, 12 Jun 2013, Marco van de Voort wrote: On Wed, Jun 12, 2013 at 10:55:24AM +0200, Michael Schnell wrote: On 06/10/2013 08:55 AM, Michael Van Canneyt wrote: Where is UNICODE defined ? Isn't the define "UNICODE" a heritage from Delphi (> version xyz) ? Yes, and if you chose the ex

Re: [Lazarus] Unicode branch

2013-06-12 Thread Marco van de Voort
On Wed, Jun 12, 2013 at 10:55:24AM +0200, Michael Schnell wrote: > On 06/10/2013 08:55 AM, Michael Van Canneyt wrote: > > > > Where is UNICODE defined ? > > > > Isn't the define "UNICODE" a heritage from Delphi (> version xyz) ? Yes, and if you chose the explicit compatibility mode for that versi

Re: [Lazarus] Unicode branch

2013-06-12 Thread Marco van de Voort
On Wed, Jun 12, 2013 at 11:00:58AM +0200, Michael Schnell wrote: > Is there already published (or somehow definable) road map for a > string-wise Delphi XE compatible FPC / Lazarus combination ? No. This is part of that, but only the most initial level. Much is not yet decided. ... including ho

Re: [Lazarus] Unicode branch

2013-06-12 Thread Michael Schnell
On 06/12/2013 02:39 PM, Michael Van Canneyt wrote: Adding -dUNICODE on the fpc commandline is difficult ? Not at all. A problem would arise, if fpc or Lazarus would define UNICODE in _a_different_ way than Delphi does, and thus simply doing " -dUNICODE" would be not allowed or not possible.

Re: [Lazarus] Unicode branch

2013-06-12 Thread Michael Van Canneyt
On Wed, 12 Jun 2013, Michael Schnell wrote: On 06/12/2013 02:18 PM, Michael Van Canneyt wrote: It is bad practice to rely in code on the defines defined by the compiler. Of course I do know this (and many more similar portability-paradigms). But my colleagues do coding only with Delphi (and

Re: [Lazarus] Unicode branch

2013-06-12 Thread Michael Schnell
On 06/12/2013 02:18 PM, Michael Van Canneyt wrote: It is bad practice to rely in code on the defines defined by the compiler. Of course I do know this (and many more similar portability-paradigms). But my colleagues do coding only with Delphi (and thus Windows) in mind. I can't help this. But

Re: [Lazarus] Unicode branch

2013-06-12 Thread Michael Van Canneyt
On Wed, 12 Jun 2013, Michael Schnell wrote: On 06/12/2013 01:35 PM, Michael Van Canneyt wrote: Add {$IFDEF FPC} {$DEFINE UNICODE} {$ENDIF} to your source, or, alternatively, fpc -dUNICODE Both do the trick. I'm not sure if this is the trick requested, as the target is to automatical

Re: [Lazarus] Unicode branch

2013-06-12 Thread Michael Schnell
On 06/12/2013 01:35 PM, Michael Van Canneyt wrote: Add {$IFDEF FPC} {$DEFINE UNICODE} {$ENDIF} to your source, or, alternatively, fpc -dUNICODE Both do the trick. I'm not sure if this is the trick requested, as the target is to automatically modify their source code in a way that it wor

Re: [Lazarus] Unicode branch

2013-06-12 Thread Michael Van Canneyt
On Wed, 12 Jun 2013, Michael Schnell wrote: On 06/12/2013 11:10 AM, Michael Van Canneyt wrote: Not necessarily. Compatible concerning Language/rtl functions, yes. Defines, this is debatable. I do know that my colleagues use "UNICODE" a lot when porting their (huge) code-base from pre-Unico

Re: [Lazarus] Unicode branch

2013-06-12 Thread Michael Schnell
On 06/12/2013 11:10 AM, Michael Van Canneyt wrote: Not necessarily. Compatible concerning Language/rtl functions, yes. Defines, this is debatable. I do know that my colleagues use "UNICODE" a lot when porting their (huge) code-base from pre-Unicode Delphi to Unicode aware Delphi versions. So

Re: [Lazarus] Unicode branch

2013-06-12 Thread Michael Van Canneyt
On Wed, 12 Jun 2013, Michael Schnell wrote: On 06/10/2013 08:55 AM, Michael Van Canneyt wrote: Where is UNICODE defined ? Isn't the define "UNICODE" a heritage from Delphi (> version xyz) ? It has a different meaning. I suppose FPC and Lazarus need to stay compatible on that behalf.

Re: [Lazarus] Unicode branch

2013-06-12 Thread Michael Schnell
Is there already published (or somehow definable) road map for a string-wise Delphi XE compatible FPC / Lazarus combination ? I am eager to (finally !!) show my colleagues - who always use the current Delphi release - a way to port their projects to Linux -Michael -- ___

Re: [Lazarus] Unicode branch

2013-06-12 Thread Michael Schnell
On 06/10/2013 08:55 AM, Michael Van Canneyt wrote: Where is UNICODE defined ? Isn't the define "UNICODE" a heritage from Delphi (> version xyz) ? I suppose FPC and Lazarus need to stay compatible on that behalf. -Michael -- ___ Lazarus mailing li

Re: [Lazarus] Unicode branch

2013-06-10 Thread Sven Barth
Am 11.06.2013 01:16 schrieb "Paul Ishenin" : > > > > 10.06.13, 23:20, Sven Barth пишет: > > >> Nope, WinCE uses FPC_OS_UNICODE ;) > > > Not in FPC 2.6.2 which must be supported by Lazarus too. Of course not, because the WinCE target was only broken a few weeks ago. There the define wasn't FPC_UNIC

Re: [Lazarus] Unicode branch

2013-06-10 Thread Paul Ishenin
10.06.13, 23:20, Sven Barth пишет: Nope, WinCE uses FPC_OS_UNICODE ;) Not in FPC 2.6.2 which must be supported by Lazarus too. Best regards, Paul Ishenin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepa

Re: [Lazarus] Unicode branch

2013-06-10 Thread Sven Barth
Am 10.06.2013 15:31 schrieb "Paul Ishenin" : > > 10.06.2013 14:55, Michael Van Canneyt пишет: > > >>> {$ifdef UNICODE} >>> TResourceType = PWideChar; >>> {$else} >>> TResourceType = PChar; >>> {$endif} >> >> >> Where is UNICODE defined ? >> >> Because the RTL is compiled with the FPC_UNIC

Re: [Lazarus] Unicode branch

2013-06-10 Thread Michael Van Canneyt
On Mon, 10 Jun 2013, Paul Ishenin wrote: 08.06.2013 21:53, Marco van de Voort пишет: During the recent FPC hackathon, Michael van Canneyt and I created a branch to switch some RTL routines to unicode. (to be exact, rawbytestring and unicodestring versions). Does your branch also includes J

Re: [Lazarus] Unicode branch

2013-06-09 Thread Michael Van Canneyt
On Mon, 10 Jun 2013, Paul Ishenin wrote: 08.06.2013 21:53, Marco van de Voort пишет: graphic.inc(155,66) Error: Incompatible type for arg no. 3: Got "PChar", expected "PWideChar" Stream := TResourceStream.CreateFromID(Instance, ResID, ResType); ResType is of type TResourceType which is de