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

2013-12-29 Thread Marco van de Voort
On Sat, Dec 28, 2013 at 02:09:58PM +0100, Florian Kl??mpfl wrote: > >> marginal oss compiler. > > > > So you're saying that FPC cannot survive without Delphi? > > Define survive. But I'am saying indeed that FPC's usage would drop > significantly if Delphi wouldn't be around anymore. A few years i

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

2013-12-29 Thread Marco van de Voort
On Sat, Dec 28, 2013 at 10:39:30AM -0200, Marcos Douglas wrote: > >> I understand. But if the major companies prefer to use C# or Java > >> instead Delphi well, they not care about Delphi compatibilities. If > >> they care, why they would be leaving Delphi? > > > > If they leave Delphi compatibilit

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

2013-12-28 Thread Flávio Etrusco
On Sat, Dec 28, 2013 at 2:35 PM, Marius wrote: > Flávio Etrusco wrote: > >>> Yes, but we all know you are a special case :-) >>> >>> Point is if you make conversion harder PEOPLE WILL NOT EVEN TRY! >> >>I tend to agree with Graeme on this one. >> >>-Flávio > > My opinion as well, and its already h

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

2013-12-28 Thread Marius
Flávio Etrusco wrote: >> Yes, but we all know you are a special case :-) >> >> Point is if you make conversion harder PEOPLE WILL NOT EVEN TRY! > >I tend to agree with Graeme on this one. > >-Flávio My opinion as well, and its already hard at this moment as generics and string/utf8 are the first

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

2013-12-28 Thread Marcos Douglas
On Sat, Dec 28, 2013 at 11:09 AM, Florian Klämpfl wrote: > Am 28.12.2013 13:39, schrieb Marcos Douglas: >>> If they leave Delphi compatibility, they normally don't go for a >>> marginal oss compiler. >> >> So you're saying that FPC cannot survive without Delphi? > > Define survive. To remain aliv

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

2013-12-28 Thread Florian Klämpfl
Am 28.12.2013 13:39, schrieb Marcos Douglas: >> If they leave Delphi compatibility, they normally don't go for a >> marginal oss compiler. > > So you're saying that FPC cannot survive without Delphi? Define survive. But I'am saying indeed that FPC's usage would drop significantly if Delphi wouldn

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

2013-12-28 Thread Marcos Douglas
On Sat, Dec 28, 2013 at 10:37 AM, Jürgen Hestermann wrote: > Am 2013-12-28 13:19, schrieb Florian Klämpfl: >>> I understand. But if the major companies prefer to use C# or Java >>> instead Delphi well, they not care about Delphi compatibilities. If >>> they care, why they would be leaving Delphi?

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

2013-12-28 Thread Marcos Douglas
On Sat, Dec 28, 2013 at 10:19 AM, Florian Klämpfl wrote: > Am 28.12.2013 13:02, schrieb Marcos Douglas: >> On Sat, Dec 28, 2013 at 9:41 AM, Florian Klämpfl >> wrote: >>> Am 28.12.2013 11:01, schrieb Marcos Douglas: [...] So, if the companies prefer to rewrite everything to an

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

2013-12-28 Thread Florian Klämpfl
Am 28.12.2013 13:02, schrieb Marcos Douglas: > On Sat, Dec 28, 2013 at 9:41 AM, Florian Klämpfl > wrote: >> Am 28.12.2013 11:01, schrieb Marcos Douglas: >>> >>> [...] >>> >>> So, if the companies prefer to rewrite everything to another language, >>> this is another prove that people do not want c

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

2013-12-28 Thread Marcos Douglas
On Sat, Dec 28, 2013 at 9:41 AM, Florian Klämpfl wrote: > Am 28.12.2013 11:01, schrieb Marcos Douglas: >> >> [...] >> >> So, if the companies prefer to rewrite everything to another language, >> this is another prove that people do not want compatibility with >> Delphi (so much). > > And you think

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

2013-12-28 Thread Flávio Etrusco
On Fri, Dec 27, 2013 at 8:49 PM, Marco van de Voort wrote: > On Fri, Dec 27, 2013 at 10:43:16PM +, Graeme Geldenhuys wrote: >> > Fact is that the extensions of FPC are used much less than the Delphi >> > compatibility aspect. >> >> And would you mind sharing how you came to that conclusion? Ca

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

2013-12-28 Thread Florian Klämpfl
Am 28.12.2013 11:01, schrieb Marcos Douglas: >> incompatibilities Free Pascal might have with Delphi. The language still >> stays a lot more similar than the alternative. Yet, looking at the >> current employment market, it seems most companies opted to rewrite >> there Delphi projects in C# and Ja

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

2013-12-28 Thread Graeme Geldenhuys
On 2013-12-27 23:55, Marco van de Voort wrote: > Somehow there is still more Delphi use than Lazarus, so I'll bounce back > the "statistics" request. Umm, I never quoted any stats. Free Pascal and Lazarus projects are like Linux - there is NO reliable way of tracking usage. So at best, any usage

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

2013-12-28 Thread Marcos Douglas
On Fri, Dec 27, 2013 at 9:07 PM, Graeme Geldenhuys wrote: > On 2013-12-27 22:49, Marco van de Voort wrote: >> >> Just look on e.g. the forums. All people are asking about Delphi packages. > > And once those Delphi packages are ported to Free Pascal, nobody needs > Delphi any more. ;-) Touché. >>

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

2013-12-27 Thread Marco van de Voort
On Sat, Dec 28, 2013 at 12:42:22AM +0100, Hans-Peter Diettrich wrote: > >> If we continue to follow Delphi, means that we are always one step behind. > > > > If we stop following delphi, we are multiple steps behind. > > FPC/Lazarus always was in front of Delphi. It had Unicode support > (UTF-8)

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

2013-12-27 Thread Marco van de Voort
On Fri, Dec 27, 2013 at 11:07:02PM +, Graeme Geldenhuys wrote: > > Just look on e.g. the forums. All people are asking about Delphi packages. > > And once those Delphi packages are ported to Free Pascal, nobody needs > Delphi any more. ;-) Somehow there is still more Delphi use than Lazarus,

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

2013-12-27 Thread Hans-Peter Diettrich
Marco van de Voort schrieb: On Fri, Dec 27, 2013 at 06:39:38PM -0200, Marcos Douglas wrote: If we continue to follow Delphi, means that we are always one step behind. If we stop following delphi, we are multiple steps behind. FPC/Lazarus always was in front of Delphi. It had Unicode support

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

2013-12-27 Thread Juha Manninen
Lazarus team has not thought it much. The question is not acute yet and we already have a working Unicode system in LCL. Thinking of it now when FPC behavior is not decided would be waste of time. My comment about UTF-8 was based on poor knowledge and maybe wishfull thinking. Some other Lazarus dev

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

2013-12-27 Thread Graeme Geldenhuys
On 2013-12-27 22:49, Marco van de Voort wrote: > > Just look on e.g. the forums. All people are asking about Delphi packages. And once those Delphi packages are ported to Free Pascal, nobody needs Delphi any more. ;-) > Point is if you make conversion harder PEOPLE WILL NOT EVEN TRY! Convertin

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

2013-12-27 Thread Juha Manninen
perjantai 27. joulukuuta 2013 Marcos Douglas kirjoitti: > I think Lazarus team did not think the same. > Lazarus team has not thought it much. The question is not acute yet and we already have a working Unicode system in LCL. Thinking of it now when -- ___

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

2013-12-27 Thread Marco van de Voort
On Fri, Dec 27, 2013 at 10:43:16PM +, Graeme Geldenhuys wrote: > > Fact is that the extensions of FPC are used much less than the Delphi > > compatibility aspect. > > And would you mind sharing how you came to that conclusion? Can you > share the data on that research? Just look on e.g. the f

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

2013-12-27 Thread Graeme Geldenhuys
On 2013-12-27 21:12, Marco van de Voort wrote: > Fact is that the extensions of FPC are used much less than the Delphi > compatibility aspect. And would you mind sharing how you came to that conclusion? Can you share the data on that research? >From my personal experience of using FPC since 2004-

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

2013-12-27 Thread Marco van de Voort
On Fri, Dec 27, 2013 at 06:39:38PM -0200, Marcos Douglas wrote: > If we continue to follow Delphi, means that we are always one step behind. If we stop following delphi, we are multiple steps behind. Most of the antis only agree on being anti, they only have simplistic topdown proposals and talk

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

2013-12-27 Thread Marcos Douglas
On Fri, Dec 27, 2013 at 3:38 PM, Graeme Geldenhuys wrote: > On 2013-12-27 17:11, Jürgen Hestermann wrote: >> Some want to make FPC/Lazarus into a (possibly exact) clone of >> Delphi (which means to follow every sh*t that is and will be put into this >> product) >> and others (like me) hope for a

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

2013-12-27 Thread Marcos Douglas
On Fri, Dec 27, 2013 at 3:11 PM, Jürgen Hestermann wrote: > Am 2013-12-27 12:21, schrieb Marco van de Voort: > >> The current situation really worries me, since at work I invested in >> FPC/Lazarus in the assumption that compatibility would increase, not >> decrease. > > I think that's the root ca

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

2013-12-27 Thread Marcos Douglas
On Fri, Dec 27, 2013 at 11:42 AM, Marco van de Voort wrote: > On Fri, Dec 27, 2013 at 12:15:00PM +, Graeme Geldenhuys wrote: >> Personally I think FPC and Lazarus should get rid of "string" >> altogether! It should be a user definable type that can be defined per >> project. >> >> eg: >> Proje

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

2013-12-27 Thread Marcos Douglas
On Fri, Dec 27, 2013 at 10:15 AM, Graeme Geldenhuys wrote: > On 2013-12-27 09:16, Hans-Peter Diettrich wrote: >> But >> when "string" becomes UTF-16, as in recent Delphi versions, Lazarus and >> the LCL deserves heavy refactoring. That's the top discussion topic >> right now. > > Personally I thin

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

2013-12-27 Thread Marcos Douglas
On Fri, Dec 27, 2013 at 9:21 AM, Marco van de Voort wrote: > On Thu, Dec 26, 2013 at 11:53:38PM -0200, Marcos Douglas wrote: >> > If you totally drop Delphi compatibility you can do whatever you want. But >> > IMHO that is more something for the Graeme's and Martin (MSEGUI's) of the >> > world, no

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

2013-12-27 Thread Marco van de Voort
On Fri, Dec 27, 2013 at 06:11:31PM +0100, J?rgen Hestermann wrote: > > I think that's the root cause of the discussion: > > Some want to make FPC/Lazarus into a (possibly exact) clone of > Delphi (which means to follow every sh*t that is and will be put into this > product) I always think it is

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

2013-12-27 Thread Marco van de Voort
On Fri, Dec 27, 2013 at 05:34:33PM +, Graeme Geldenhuys wrote: > > Please read 4 years of discussion backlog. It is not all language, there is > > something called > > "libraries", and they are generally installed precompiled. > > I don't know of a single ISV that ships precompiled *.ppu file

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

2013-12-27 Thread Reinier Olislagers
On 27/12/2013 18:34, Graeme Geldenhuys wrote: > On 2013-12-27 13:42, Marco van de Voort wrote: >> >> Please read 4 years of discussion backlog. It is not all language, there is >> something called >> "libraries", and they are generally installed precompiled. > > I don't know of a single ISV that

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

2013-12-27 Thread Graeme Geldenhuys
On 2013-12-27 13:42, Marco van de Voort wrote: > > Please read 4 years of discussion backlog. It is not all language, there is > something called > "libraries", and they are generally installed precompiled. I don't know of a single ISV that ships precompiled *.ppu files for FPC or Lazarus. They

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

2013-12-27 Thread Graeme Geldenhuys
On 2013-12-27 17:11, Jürgen Hestermann wrote: > Some want to make FPC/Lazarus into a (possibly exact) clone of > Delphi (which means to follow every sh*t that is and will be put into this > product) > and others (like me) hope for a more Pascal like programming environment > which at least avoids

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

2013-12-27 Thread Jürgen Hestermann
Am 2013-12-27 12:21, schrieb Marco van de Voort: > The current situation really worries me, since at work I invested in > FPC/Lazarus in the assumption that compatibility would increase, not decrease. I think that's the root cause of the discussion: Some want to make FPC/Lazarus into a (possibly

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

2013-12-27 Thread Marco van de Voort
On Fri, Dec 27, 2013 at 12:15:00PM +, Graeme Geldenhuys wrote: > Personally I think FPC and Lazarus should get rid of "string" > altogether! It should be a user definable type that can be defined per > project. > > eg: > Projects could do the following > > type > {$IFDEF WINDOWS} >

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

2013-12-27 Thread Graeme Geldenhuys
On 2013-12-27 09:16, Hans-Peter Diettrich wrote: > But > when "string" becomes UTF-16, as in recent Delphi versions, Lazarus and > the LCL deserves heavy refactoring. That's the top discussion topic > right now. Personally I think FPC and Lazarus should get rid of "string" altogether! It should

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

2013-12-27 Thread Marco van de Voort
On Thu, Dec 26, 2013 at 11:53:38PM -0200, Marcos Douglas wrote: > > If you totally drop Delphi compatibility you can do whatever you want. But > > IMHO that is more something for the Graeme's and Martin (MSEGUI's) of the > > world, not Lazarus. > > Ok... but if FPC, on Windows, will be UTF-16 and

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

2013-12-27 Thread Marco van de Voort
On Thu, Dec 26, 2013 at 04:48:34PM +0200, Juha Manninen wrote: > It happened again. The word "Unicode" was mentioned and the result is > an endless debate of how it should be done. Now > 100 messages and > counting ... This is because still nothing definitive is chosen, after 4+ years of discussio

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

2013-12-27 Thread Hans-Peter Diettrich
Marco van de Voort schrieb: On Thu, Dec 26, 2013 at 12:28:54AM +0100, Hans-Peter Diettrich wrote: is dangerous if they are not all the same encoding. If there is any mismatch, it will be converted down to default encoding. Then the implementation is wrong. Wrong according to you. Wrong, or

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

2013-12-27 Thread Hans-Peter Diettrich
Juha Manninen schrieb: It happened again. The word "Unicode" was mentioned and the result is an endless debate of how it should be done. Now > 100 messages and counting ... Now that we are in pre-release of strings with Encoding, the debate enters a very new round. I personally don't care m

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

2013-12-27 Thread Hans-Peter Diettrich
Sven Barth schrieb: On 26.12.2013 17:02, Sven Barth wrote: Am 26.12.2013 12:30 schrieb "Hans-Peter Diettrich" mailto:drdiettri...@aol.com>>: > > Sven Barth schrieb: >> >> Am 26.12.2013 02:19 schrieb "Hans-Peter Diettrich" mailto:drdiettri...@aol.com>

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

2013-12-26 Thread Marcos Douglas
On Thu, Dec 26, 2013 at 1:04 PM, Marco van de Voort wrote: > On Thu, Dec 26, 2013 at 12:28:54AM +0100, Hans-Peter Diettrich wrote: >> > is dangerous if they are not all the same encoding. If there is any >> > mismatch, it will be converted down to default encoding. >> >> Then the implementation is

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

2013-12-26 Thread Sven Barth
On 26.12.2013 17:02, Sven Barth wrote: Am 26.12.2013 12:30 schrieb "Hans-Peter Diettrich" mailto:drdiettri...@aol.com>>: > > Sven Barth schrieb: >> >> Am 26.12.2013 02:19 schrieb "Hans-Peter Diettrich" mailto:drdiettri...@aol.com> >>:

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

2013-12-26 Thread Sven Barth
Am 26.12.2013 12:30 schrieb "Hans-Peter Diettrich" : > > Sven Barth schrieb: >> >> Am 26.12.2013 02:19 schrieb "Hans-Peter Diettrich" >> >: > Please specify "AnsiString", of which encoding? > > When I concat an AnsiString and an UTF8String and assign it to an OEMString > o := a + u; > then I get

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

2013-12-26 Thread Marco van de Voort
On Thu, Dec 26, 2013 at 12:28:54AM +0100, Hans-Peter Diettrich wrote: > > is dangerous if they are not all the same encoding. If there is any > > mismatch, it will be converted down to default encoding. > > Then the implementation is wrong. Wrong according to you. Not wrong according to defined

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

2013-12-26 Thread Juha Manninen
It happened again. The word "Unicode" was mentioned and the result is an endless debate of how it should be done. Now > 100 messages and counting ... I personally don't care much what the default encoding will be, but I wonder how easy it will be to use UTF-8 for my employer's code. The situation

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

2013-12-26 Thread Marco van de Voort
On Wed, Dec 25, 2013 at 10:43:24PM +0100, Jy V wrote: > Sorry Marco, No problem. > On Wed, Dec 25, 2013 at 6:15 PM, Marco van de Voort wrote: > > > There is no utf8 on Windows. One can try to mess with the defaultcodepage, > > but that will probably only force a different kind of problems. > >

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

2013-12-26 Thread Hans-Peter Diettrich
Sven Barth schrieb: Am 26.12.2013 02:19 schrieb "Hans-Peter Diettrich" >: > > Sven Barth schrieb: > > >> If in 2.6.2 your three strings contain text of different encodings then the resulting string might be garbage from the user's POV. >> In trunk the encoding

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

2013-12-26 Thread Jürgen Hestermann
Am 2013-12-25 19:50, schrieb Marco van de Voort: > In short, I don't think fighting the native encoding of an target is worth > the shallow appeal of the "one encoding rules all" principle. That is mostly > pushed by people that don't even use windows, and thus won't feel the pain. This is not tr

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

2013-12-26 Thread Sven Barth
Am 26.12.2013 02:19 schrieb "Hans-Peter Diettrich" : > > Sven Barth schrieb: > > >> If in 2.6.2 your three strings contain text of different encodings then the resulting string might be garbage from the user's POV. >> In trunk the encoding is part of each string and if they differ then each strings

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

2013-12-26 Thread Sven Barth
Am 26.12.2013 00:24 schrieb "Marcos Douglas" : > > On Wed, Dec 25, 2013 at 7:41 PM, Sven Barth wrote: > > Am 25.12.2013 19:19 schrieb "Marcos Douglas" : > >> > Since that means typically two per target, it was suggested to combine > >> > this > >> > using dotted unit functionality. > >> > >> I did

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

2013-12-25 Thread Hans-Peter Diettrich
Sven Barth schrieb: If in 2.6.2 your three strings contain text of different encodings then the resulting string might be garbage from the user's POV. In trunk the encoding is part of each string and if they differ then each strings will be converted to the default string encoding (defined by

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

2013-12-25 Thread Hans-Peter Diettrich
Marco van de Voort schrieb: The only problem on Windows is that you must only pass a string with a very clear encoding to a RTL function. so assignfile(f,s+s2+s3); is dangerous if they are not all the same encoding. If there is any mismatch, it will be converted down to default encodin

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

2013-12-25 Thread Marcos Douglas
On Wed, Dec 25, 2013 at 7:41 PM, Sven Barth wrote: > Am 25.12.2013 19:19 schrieb "Marcos Douglas" : >> > 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 X

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

2013-12-25 Thread Sven Barth
Am 25.12.2013 22:44 schrieb "Jy V" : > > Sorry Marco, > > On Wed, Dec 25, 2013 at 6:15 PM, Marco van de Voort wrote: >> >> There is no utf8 on Windows. One can try to mess with the defaultcodepage, >> but that will probably only force a different kind of problems. > > > I cannot let you answer alo

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

2013-12-25 Thread Craig Peterson
On Dec 25, 2013, at 3:43 PM, Jy V wrote: > I cannot let you answer alone and make you appear as the only knowledgeable > reference for this important subject, > it looks like defining default code page 65001 for Windows make it perfect > fit to handle UTF-8 > http://msdn.microsoft.com/en-us/libr

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

2013-12-25 Thread Sven Barth
Am 25.12.2013 19:35 schrieb "Marcos Douglas" : > > The only problem on Windows is that you must only pass a string with a very > > clear encoding to a RTL function. > > > > so > > > > assignfile(f,s+s2+s3); > > > > is dangerous if they are not all the same encoding. If there is any > > mismatch, i

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

2013-12-25 Thread Jy V
Sorry Marco, On Wed, Dec 25, 2013 at 6:15 PM, Marco van de Voort wrote: > There is no utf8 on Windows. One can try to mess with the defaultcodepage, > but that will probably only force a different kind of problems. > I cannot let you answer alone and make you appear as the only knowledgeable re

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

2013-12-25 Thread Sven Barth
Am 25.12.2013 19:19 schrieb "Marcos Douglas" : > > 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

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

2013-12-25 Thread Marco van de Voort
On Wed, Dec 25, 2013 at 04:34:40PM -0200, Marcos Douglas wrote: > > There are many scenarios up in the sky, and nothing is 100% certain, but it > > would at least be significantly better. It is already significantly better > > in trunk. > > When you say that is better in trunk is only on FPC conte

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

2013-12-25 Thread Marcos Douglas
On Wed, Dec 25, 2013 at 3:15 PM, Marco van de Voort wrote: > On Tue, Dec 24, 2013 at 12:22:41PM -0200, Marcos Douglas wrote: >> > IMO the biggest group are old fashioned Delphi (D7) users, which want their >> > existing Ansi/VCL code base supported *without* complications and >> > incompatibilitie

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

2013-12-25 Thread Marcos Douglas
On Wed, Dec 25, 2013 at 3:08 PM, Marco van de Voort wrote: > On Wed, Dec 25, 2013 at 09:57:05AM -0200, Marcos Douglas wrote: >> > >> > The mode concept is all good and well, but here it breaks down... :( >> >> So, if the {mode} continue to be a way, I think it should be used on >> "platform level"

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

2013-12-25 Thread Marco van de Voort
On Tue, Dec 24, 2013 at 12:22:41PM -0200, Marcos Douglas wrote: > > IMO the biggest group are old fashioned Delphi (D7) users, which want their > > existing Ansi/VCL code base supported *without* complications and > > incompatibilities introduced by the newer Delphi versions. The subject of > > thi

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

2013-12-25 Thread Marco van de Voort
On Wed, Dec 25, 2013 at 09:57:05AM -0200, Marcos Douglas wrote: > > > > The mode concept is all good and well, but here it breaks down... :( > > So, if the {mode} continue to be a way, I think it should be used on > "platform level", not per "unit level". That was the original proposal from me. A

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

2013-12-25 Thread Marco van de Voort
On Tue, Dec 24, 2013 at 12:33:41PM -0200, Marcos Douglas wrote: > > But the prime point is that IMHO an utf8 Windows is insane, and it should be > > possible to port modern Delphi VCL apps at least to Windows. Preferably to > > all. > > Sorry if I say something crazy, but what do you think to use

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

2013-12-25 Thread Marcos Douglas
On Tue, Dec 24, 2013 at 7:08 PM, Sven Barth wrote: > Am 24.12.2013 15:34 schrieb "Marcos Douglas" : > > >> Sorry if I say something crazy, but what do you think to use UTF-16 on >> {mode delphi} and UTF-8 in {mode fpc}? > > That is already the case with mode delphiunicode. But the big problem are

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

2013-12-25 Thread Martin Schreiber
On Wednesday 25 December 2013 11:03:55 Jürgen Hestermann wrote: > So UTF16 has all drawbacks of all encodings but no benefit > (except that this awfull decision is used by Windows). > This is not true. Everytime someone claims this nonsense I need to comment but I will not argue again. ;-) Marti

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

2013-12-25 Thread Hans-Peter Diettrich
Jürgen Hestermann schrieb: Am 2013-12-25 01:36, schrieb Hans-Peter Diettrich: > Whenever the encoding matters, most users and applications are best off > with their regional Ansi encoding - all used characters are single bytes. You forget that using ANSI API functions on Windows not only has

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

2013-12-25 Thread Graeme Geldenhuys
On 2013-12-25 10:03, Jürgen Hestermann wrote: > So UTF16 has all drawbacks of all encodings but no benefit (except > that this awful decision is used by Windows). +1 Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ -- __

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

2013-12-25 Thread Graeme Geldenhuys
On 2013-12-25 10:05, Graeme Geldenhuys wrote: >> But which? > > UTF-8 of course! It's the newest Unicode encoding that overcomes all > problems found in other encodings. This guy explains it very well. https://www.youtube.com/watch?v=MijmeoH9LT4 Regards, - Graeme - -- fpGUI Toolkit - a

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

2013-12-25 Thread Graeme Geldenhuys
On 2013-12-24 17:13, Jürgen Hestermann wrote: > All units used should use the same string encoding IMO. > But which? UTF-8 of course! It's the newest Unicode encoding that overcomes all problems found in other encodings. It is also the only Unicode encoding that is backwards compatible with ASCII

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

2013-12-25 Thread Jürgen Hestermann
Am 2013-12-25 01:36, schrieb Hans-Peter Diettrich: > Whenever the encoding matters, most users and applications are best off > with their regional Ansi encoding - all used characters are single bytes. You forget that using ANSI API functions on Windows not only has the drawback that you cannot ac

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

2013-12-24 Thread Hans-Peter Diettrich
Marcos Douglas schrieb: On Tue, Dec 24, 2013 at 3:18 AM, Hans-Peter Diettrich wrote: I started this thread. My problem isn't to use UTF-8 on Windows... my problem is use different encodings on the same code, ie, RTL <> LCL. This mix would cause problems, of course. Use functions, always,

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

2013-12-24 Thread Hans-Peter Diettrich
Jürgen Hestermann schrieb: The ANSI interface should not be used anymore. It is obsolete and only needed for ancient OS's like DOS. But programmers should not be encourraged to use it on modern platforms. Just use UTF8 *everywhere*. That should be the aim IMO. Whenever the encoding matters,

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

2013-12-24 Thread Sven Barth
Am 24.12.2013 15:34 schrieb "Marcos Douglas" : > Sorry if I say something crazy, but what do you think to use UTF-16 on > {mode delphi} and UTF-8 in {mode fpc}? That is already the case with mode delphiunicode. But the big problem are classes and their inheritance. Take TStringList for example. Le

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

2013-12-24 Thread Jürgen Hestermann
Am 24.12.2013 15:26, schrieb Marco van de Voort: >> But in APIs it would not matter much to convert (in general the time for >> conversion is negligible compared to the time that is needed for the rest >> around the API call). > Maybe. (less so for fine grained structures, e.g. think a virtual

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

2013-12-24 Thread Marcos Douglas
On Tue, Dec 24, 2013 at 3:13 PM, Jürgen Hestermann wrote: > Am 24.12.2013 15:22, schrieb Marcos Douglas: > >> Use functions, always, to convert string between RTL and LCL and >> vice-versa IHMO is wrong because the final code is confusing. In a >> huge application you still need to think "here is

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

2013-12-24 Thread Jürgen Hestermann
Am 24.12.2013 15:22, schrieb Marcos Douglas: > Use functions, always, to convert string between RTL and LCL and > vice-versa IHMO is wrong because the final code is confusing. In a > huge application you still need to think "here is UTF-8 or > ANSI/UTF-16?" That's true. It's a pain to pay attenti

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

2013-12-24 Thread Marcos Douglas
On Tue, Dec 24, 2013 at 12:19 PM, Marco van de Voort wrote: > On Tue, Dec 24, 2013 at 06:18:41AM +0100, Hans-Peter Diettrich wrote: >> > >> > Not necessarily. Supporting both on both platforms is a sane reason too. >> > >> > One can't ditch utf16 because of Delphi compatibility. It will be hard to

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

2013-12-24 Thread Marco van de Voort
On Tue, Dec 24, 2013 at 12:18:49PM +0100, J?rgen Hestermann wrote: > > But if I have to chose to kill one, it is utf8. It is the lesser used > choice > > for unicode strings INSIDE APPLICATIONS. Yes, UTF8 is dominant in > documents, but > > not in APIs. > > But in APIs it would not matter mu

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

2013-12-24 Thread Marcos Douglas
On Tue, Dec 24, 2013 at 3:18 AM, Hans-Peter Diettrich wrote: > Marco van de Voort schrieb: >> >> On Mon, Dec 23, 2013 at 06:52:21PM +0100, J?rgen Hestermann wrote: >> >>> Am 2013-12-23 11:32, schrieb Marco van de Voort: >>> > So I would say UTF16, and maybe, if there is demand, some can get utf8

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

2013-12-24 Thread Marco van de Voort
On Tue, Dec 24, 2013 at 06:18:41AM +0100, Hans-Peter Diettrich wrote: > > > > Not necessarily. Supporting both on both platforms is a sane reason too. > > > > One can't ditch utf16 because of Delphi compatibility. It will be hard to > > ditch utf8 because of old Lazarus compatibility. > > In the

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

2013-12-24 Thread Jürgen Hestermann
Am 2013-12-23 23:08, schrieb Marco van de Voort: > But if I have to chose to kill one, it is utf8. It is the lesser used choice > for unicode strings INSIDE APPLICATIONS. Yes, UTF8 is dominant in documents, but > not in APIs. But in APIs it would not matter much to convert (in general the time

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

2013-12-23 Thread Hans-Peter Diettrich
Marco van de Voort schrieb: On Mon, Dec 23, 2013 at 06:52:21PM +0100, J?rgen Hestermann wrote: Am 2013-12-23 11:32, schrieb Marco van de Voort: > So I would say UTF16, and maybe, if there is demand, some can get utf8 :-) The question is: Should FPC and LCL use a fixed encoding for all platform

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

2013-12-23 Thread Marco van de Voort
On Mon, Dec 23, 2013 at 06:52:21PM +0100, J?rgen Hestermann wrote: > Am 2013-12-23 11:32, schrieb Marco van de Voort: > > So I would say UTF16, and maybe, if there is demand, some can get utf8 :-) > > The question is: > Should FPC and LCL use a fixed encoding for all platforms > or should the enc

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

2013-12-23 Thread Marcos Douglas
On Mon, Dec 23, 2013 at 8:38 AM, Marco van de Voort wrote: > On Sun, Dec 22, 2013 at 05:06:27PM -0200, Marcos Douglas wrote: >> > FPC 2.7.x can compile the windows unit in unicode (UTF16) mode. Most >> > system and >> > sysutils file related routines are already unicode (UTF16 with >> > Rawbytes

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

2013-12-23 Thread Jürgen Hestermann
Am 2013-12-23 11:32, schrieb Marco van de Voort: > So I would say UTF16, and maybe, if there is demand, some can get utf8 :-) The question is: Should FPC and LCL use a fixed encoding for all platforms or should the encoding be adapted for each WidgetSet/OS? If it should be the same for all plat

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

2013-12-23 Thread Juha Manninen
On Mon, Dec 23, 2013 at 1:58 PM, Hans-Peter Diettrich wrote: > Then you can give your favorite string type a unique name, and set it to > whatever is best in your favorite environment. The favorite string type in this case would be UTF8String. It already has a name. Please see what I was writing

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

2013-12-23 Thread Hans-Peter Diettrich
Juha Manninen schrieb: However using a new Unicode-Delphi would cause many problems because all VCL functions and classes, including TStringList, expect UTF-16 string. When using UTF8String, the compiler converts between encodings all the time. Then you can give your favorite string type a uni

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

2013-12-23 Thread Marco van de Voort
On Sun, Dec 22, 2013 at 05:06:27PM -0200, Marcos Douglas wrote: > > FPC 2.7.x can compile the windows unit in unicode (UTF16) mode. Most system > > and > > sysutils file related routines are already unicode (UTF16 with Rawbytestring > > overload). > > So FPC 2.7.x can compile the windows unit in

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

2013-12-23 Thread Marco van de Voort
On Sun, Dec 22, 2013 at 11:52:04PM +0100, Hans-Peter Diettrich wrote: > > Keeping UTF8 on Windows makes a majority platform seem only half supported. > > Not good either. Worse, it is Delphi incompatible. > > You favor a special FPC and Lazarus for Windows, in addition to the > UTF-8 version for

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

2013-12-22 Thread Hans-Peter Diettrich
Marco van de Voort schrieb: Keeping UTF8 on Windows makes a majority platform seem only half supported. Not good either. Worse, it is Delphi incompatible. You favor a special FPC and Lazarus for Windows, in addition to the UTF-8 version for all other platforms? DoDi -- ___

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

2013-12-22 Thread Marcos Douglas
On Sun, Dec 22, 2013 at 4:56 PM, Marco van de Voort wrote: > On Sun, Dec 15, 2013 at 06:13:32PM +0100, Reinier Olislagers wrote: >> > FPC's context. >> > These components do not use Lazarus' routines and that is the BIG >> > problem. I need to "remember" in pass only ANSI strings for these >> > co

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

2013-12-22 Thread Marco van de Voort
On Wed, Dec 18, 2013 at 12:03:56PM +0100, Hans-Peter Diettrich wrote: > > Apart from that there's not much else you can do except contribute > > patches to help "unicode-ise" the FPC RTL... > > The new AnsiStrings (with Encoding and automatic conversion) should be > sufficient, Unicode is not requ

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

2013-12-22 Thread Marco van de Voort
On Sun, Dec 15, 2013 at 06:13:32PM +0100, Reinier Olislagers wrote: > > FPC's context. > > These components do not use Lazarus' routines and that is the BIG > > problem. I need to "remember" in pass only ANSI strings for these > > components as remember to convert the component's output string > >

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

2013-12-22 Thread Marcos Douglas
On Sun, Dec 22, 2013 at 7:06 AM, Juha Manninen wrote: > On Sat, Dec 21, 2013 at 5:41 PM, Marcos Douglas wrote: >>> LCL (and VCL) typically use events, like TNotifyEvent. They are >>> basically just call-back functions. >> Oh, not same. I use a lot Events -- no only Form or GUI components -- >> in

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

2013-12-22 Thread Juha Manninen
On Sat, Dec 21, 2013 at 7:55 PM, Jürgen Hestermann wrote: >> The bottom line is: Use only UTF-16 with Delphi and it works very well. > I would not like Lazarus to do the same. > UTF16 is the worst of all possible unicode encodings. I believe LCL will continue to use UTF-8. Nobody knows yet how ma

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

2013-12-22 Thread Juha Manninen
On Sat, Dec 21, 2013 at 5:41 PM, Marcos Douglas wrote: >> LCL (and VCL) typically use events, like TNotifyEvent. They are >> basically just call-back functions. > Oh, not same. I use a lot Events -- no only Form or GUI components -- > in my core codes but PostMessage is very different, eg., you ca

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

2013-12-21 Thread Jürgen Hestermann
Am 2013-12-21 16:18, schrieb Juha Manninen: The bottom line is: Use only UTF-16 with Delphi and it works very well. I would not like Lazarus to do the same. UTF16 is the worst of all possible unicode encodings. -- ___ Lazarus mailing list Lazarus@

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

2013-12-21 Thread Marcos Douglas
On Sat, Dec 21, 2013 at 1:18 PM, Juha Manninen wrote: > On Sat, Dec 21, 2013 at 4:33 PM, Marcos Douglas wrote: >> That's it! >> I think you talking about of new versions of Delphi, right? So I >> always read that "new Unicode implementation" in new versions of >> Delphi is wrong, broke things, et

  1   2   >