Re: [Lazarus] Lazarus (UTF8) and Windows: SysToUTF8, UTF8ToSys... Is there a better solution?
On Sun, 15 Dec 2013 17:47:09 -0200 Marcos Douglas m...@delfire.net wrote: On Sun, Dec 15, 2013 at 3:13 PM, Reinier Olislagers reinierolislag...@gmail.com wrote: On 15/12/2013 16:25, Marcos Douglas wrote: On Sun, Dec 15, 2013 at 1:08 PM, Bart bartjun...@gmail.com wrote: So for basic stuff all this is already taken care of. Only in Lazarus' context... but I have some components that is only 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 results to use in Lazarus. Why not just include a project reference to LCLBase (IIRC that should be enough) and just always use the LCL units until FPC catches up? You propose include LCL in packages that not have LCL references and change all code of these packages to use UTF8 functions?? Note: The Lazarus UTF8 functions are in the package LazUtils. You don't need to use the LCL (nor LCLBase) if you only need the UTF8 functions. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus (UTF8) and Windows: SysToUTF8, UTF8ToSys... Is there a better solution?
On Mon, Dec 16, 2013 at 3:30 AM, Reinier Olislagers reinierolislag...@gmail.com wrote: On 15/12/2013 20:47, Marcos Douglas wrote: On Sun, Dec 15, 2013 at 3:13 PM, Reinier Olislagers reinierolislag...@gmail.com wrote: On 15/12/2013 16:25, Marcos Douglas wrote: On Sun, Dec 15, 2013 at 1:08 PM, Bart bartjun...@gmail.com wrote: problem. I need to remember in pass only ANSI strings for these components as remember to convert the component's output string results to use in Lazarus. Why not just include a project reference to LCLBase (IIRC that should be enough) and just always use the LCL units until FPC catches up? You propose include LCL in packages that not have LCL references and change all code of these packages to use UTF8 functions?? I think didn't understand what you proposed... I think I don't understand what you're after? You said yourself you don't want to pass ANSI strings!?!? I said a trick to use only ANSI. My suggestion is to replace calls to the FPC (ANSI) RTL with LCL UTF8 equivalents in your code where possible. But FPC still ANSI and all read/write in FPC is ANSI. We can not override these internal FPC's routines... and, some packages are used by others non-GUI program and that not have dependencies to LCL. Apart from that there's not much else you can do except contribute patches to help unicode-ise the FPC RTL... Ok... But first I would like to know who have these same problems, like me, working on Windows and what these people do to bypass these problems. Regards, Marcos Douglas -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus (UTF8) and Windows: SysToUTF8, UTF8ToSys... Is there a better solution?
On 16/12/2013 12:15, Marcos Douglas wrote: On Mon, Dec 16, 2013 at 3:30 AM, Reinier Olislagers reinierolislag...@gmail.com wrote: On 15/12/2013 20:47, Marcos Douglas wrote: On Sun, Dec 15, 2013 at 3:13 PM, Reinier Olislagers reinierolislag...@gmail.com wrote: On 15/12/2013 16:25, Marcos Douglas wrote: On Sun, Dec 15, 2013 at 1:08 PM, Bart bartjun...@gmail.com wrote: My suggestion is to replace calls to the FPC (ANSI) RTL with LCL UTF8 equivalents in your code where possible. But FPC still ANSI and all read/write in FPC is ANSI. We can not override these internal FPC's routines... and, some packages are used by others non-GUI program and that not have dependencies to LCL. Sigh. I don't think you understood what I wrote. And LCLBase doesn't pull in GUI stuff, IIUC... Apart from that there's not much else you can do except contribute patches to help unicode-ise the FPC RTL... Ok... But first I would like to know who have these same problems, like me, working on Windows and what these people do to bypass these problems. As is customary whenever somebody mentions the magic U word, I'm sure you'll get a lot of responses -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus (UTF8) and Windows: SysToUTF8, UTF8ToSys... Is there a better solution?
On Mon, Dec 16, 2013 at 7:41 AM, Mattias Gaertner nc-gaert...@netcologne.de wrote: On Sun, 15 Dec 2013 17:47:09 -0200 Marcos Douglas m...@delfire.net wrote: On Sun, Dec 15, 2013 at 3:13 PM, Reinier Olislagers reinierolislag...@gmail.com wrote: On 15/12/2013 16:25, Marcos Douglas wrote: On Sun, Dec 15, 2013 at 1:08 PM, Bart bartjun...@gmail.com wrote: So for basic stuff all this is already taken care of. Only in Lazarus' context... but I have some components that is only 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 results to use in Lazarus. Why not just include a project reference to LCLBase (IIRC that should be enough) and just always use the LCL units until FPC catches up? You propose include LCL in packages that not have LCL references and change all code of these packages to use UTF8 functions?? Note: The Lazarus UTF8 functions are in the package LazUtils. You don't need to use the LCL (nor LCLBase) if you only need the UTF8 functions. Mattias You're right. IMHO, the real problem is not to use LCL/LazUtils but having multiple calls to SysToUTF8..UTF8ToSys in all code. Question: After the new FPC version is released, how Lazarus will work together FPC Unicode? Marcos Douglas -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus (UTF8) and Windows: SysToUTF8, UTF8ToSys... Is there a better solution?
On Mon, Dec 16, 2013 at 8:18 AM, Reinier Olislagers reinierolislag...@gmail.com wrote: On 16/12/2013 12:15, Marcos Douglas wrote: On Mon, Dec 16, 2013 at 3:30 AM, Reinier Olislagers reinierolislag...@gmail.com wrote: On 15/12/2013 20:47, Marcos Douglas wrote: On Sun, Dec 15, 2013 at 3:13 PM, Reinier Olislagers reinierolislag...@gmail.com wrote: On 15/12/2013 16:25, Marcos Douglas wrote: On Sun, Dec 15, 2013 at 1:08 PM, Bart bartjun...@gmail.com wrote: My suggestion is to replace calls to the FPC (ANSI) RTL with LCL UTF8 equivalents in your code where possible. But FPC still ANSI and all read/write in FPC is ANSI. We can not override these internal FPC's routines... and, some packages are used by others non-GUI program and that not have dependencies to LCL. Sigh. I don't think you understood what I wrote. So explain better, please. And LCLBase doesn't pull in GUI stuff, IIUC... Sigh. I know. I think you did not understand is: Some packages do not work (internally) using UTF8 strings. I can change all code to use UTF8 in all package and all projects... but this would be a massive work. Apart from that there's not much else you can do except contribute patches to help unicode-ise the FPC RTL... Ok... But first I would like to know who have these same problems, like me, working on Windows and what these people do to bypass these problems. As is customary whenever somebody mentions the magic U word, I'm sure you'll get a lot of responses Sorry, I didn't understand... (sarcasm?) Thank you, Marcos Douglas -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus (UTF8) and Windows: SysToUTF8, UTF8ToSys... Is there a better solution?
On 16/12/2013 12:51, Marcos Douglas wrote: On Mon, Dec 16, 2013 at 8:18 AM, Reinier Olislagers reinierolislag...@gmail.com wrote: On 16/12/2013 12:15, Marcos Douglas wrote: On Mon, Dec 16, 2013 at 3:30 AM, Reinier Olislagers reinierolislag...@gmail.com wrote: On 15/12/2013 20:47, Marcos Douglas wrote: On Sun, Dec 15, 2013 at 3:13 PM, Reinier Olislagers reinierolislag...@gmail.com wrote: On 15/12/2013 16:25, Marcos Douglas wrote: On Sun, Dec 15, 2013 at 1:08 PM, Bart bartjun...@gmail.com wrote: My suggestion is to replace calls to the FPC (ANSI) RTL with LCL UTF8 equivalents in your code where possible. But FPC still ANSI and all read/write in FPC is ANSI. We can not override these internal FPC's routines... and, some packages are used by others non-GUI program and that not have dependencies to LCL. Sigh. I don't think you understood what I wrote. So explain better, please. I tried 2 times already, sorry. It's not important anyway. Sigh. I know. I think you did not understand is: Some packages do not work (internally) using UTF8 strings. I can change all code to use UTF8 in all package and all projects... but this would be a massive work. And my point is (unfortunately also... sigh...) that you cannot expect that to change magically. Conversion is going to be required unless and until... well I'll stop here, see the many U* threads on this list, the FPC one and fpc-devel. As is customary whenever somebody mentions the magic U word, I'm sure you'll get a lot of responses Sorry, I didn't understand... (sarcasm?) Yes, but not directed at you - at the reactions of this list whenever that word with U is mentioned ;) -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus (UTF8) and Windows: SysToUTF8, UTF8ToSys... Is there a better solution?
On Mon, 16 Dec 2013 09:22:54 -0200 Marcos Douglas m...@delfire.net wrote: On Mon, Dec 16, 2013 at 7:41 AM, Mattias Gaertner [...] Note: The Lazarus UTF8 functions are in the package LazUtils. You don't need to use the LCL (nor LCLBase) if you only need the UTF8 functions. Mattias You're right. IMHO, the real problem is not to use LCL/LazUtils but having multiple calls to SysToUTF8..UTF8ToSys in all code. The problem is not specific to the LCL. The problem is using libraries with different encodings. Question: After the new FPC version is released, how Lazarus will work together FPC Unicode? What do you mean with FPC Unicode. The new compiler feature of strings with encoding and various changes to the RTL or the idea to release a FPC flavor with dotted unitnames and String=UnicodeString? Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Lazarus directives
Noting that Lazarus now accepts %region and %endregion as well as %H-, is there a full list of these directives anywhere? Would it be possible to add %todo as an alternative to todo:, to reduce proliferation of multiple formats? -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus directives
On Mon, 16 Dec 2013 13:45:10 + Mark Morgan Lloyd markmll.laza...@telemetry.co.uk wrote: Noting that Lazarus now accepts %region and %endregion as well as %H-, is there a full list of these directives anywhere? There is a wiki page: http://wiki.lazarus.freepascal.org/IDE_directives Would it be possible to add %todo as an alternative to todo:, to reduce proliferation of multiple formats? Do you mean like this: http://xkcd.com/927/ Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus (UTF8) and Windows: SysToUTF8, UTF8ToSys... Is there a better solution?
On Mon, Dec 16, 2013 at 9:10 AM, Reinier Olislagers reinierolislag...@gmail.com wrote: On 16/12/2013 12:51, Marcos Douglas wrote: On Mon, Dec 16, 2013 at 8:18 AM, Reinier Olislagers reinierolislag...@gmail.com wrote: On 16/12/2013 12:15, Marcos Douglas wrote: On Mon, Dec 16, 2013 at 3:30 AM, Reinier Olislagers reinierolislag...@gmail.com wrote: On 15/12/2013 20:47, Marcos Douglas wrote: On Sun, Dec 15, 2013 at 3:13 PM, Reinier Olislagers reinierolislag...@gmail.com wrote: On 15/12/2013 16:25, Marcos Douglas wrote: On Sun, Dec 15, 2013 at 1:08 PM, Bart bartjun...@gmail.com wrote: My suggestion is to replace calls to the FPC (ANSI) RTL with LCL UTF8 equivalents in your code where possible. But FPC still ANSI and all read/write in FPC is ANSI. We can not override these internal FPC's routines... and, some packages are used by others non-GUI program and that not have dependencies to LCL. Sigh. I don't think you understood what I wrote. So explain better, please. I tried 2 times already, sorry. It's not important anyway. Ok, no problem. Sigh. I know. I think you did not understand is: Some packages do not work (internally) using UTF8 strings. I can change all code to use UTF8 in all package and all projects... but this would be a massive work. And my point is (unfortunately also... sigh...) that you cannot expect that to change magically. Conversion is going to be required unless and until... well I'll stop here, see the many U* threads on this list, the FPC one and fpc-devel. Ok, thank you. As is customary whenever somebody mentions the magic U word, I'm sure you'll get a lot of responses Sorry, I didn't understand... (sarcasm?) Yes, but not directed at you - at the reactions of this list whenever that word with U is mentioned ;) Hm... Ok... thanks again. Marcos Douglas -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus (UTF8) and Windows: SysToUTF8, UTF8ToSys... Is there a better solution?
On Mon, Dec 16, 2013 at 9:28 AM, Mattias Gaertner nc-gaert...@netcologne.de wrote: On Mon, 16 Dec 2013 09:22:54 -0200 Marcos Douglas m...@delfire.net wrote: On Mon, Dec 16, 2013 at 7:41 AM, Mattias Gaertner [...] Note: The Lazarus UTF8 functions are in the package LazUtils. You don't need to use the LCL (nor LCLBase) if you only need the UTF8 functions. Mattias You're right. IMHO, the real problem is not to use LCL/LazUtils but having multiple calls to SysToUTF8..UTF8ToSys in all code. The problem is not specific to the LCL. The problem is using libraries with different encodings. Of course! But I'm using Lazarus and... LCL... so, I'm searching a better way to continue programming without concern about these problems -- at least decrease. Just for clarify: I'm not judging the LCL or whatever. I'm only searching a solution to my problems. If I can help the Lazarus team, in a near future, would be great. Question: After the new FPC version is released, how Lazarus will work together FPC Unicode? What do you mean with FPC Unicode. The new compiler feature of strings with encoding and various changes to the RTL or the idea to release a FPC flavor with dotted unitnames and String=UnicodeString? I mean new compiler feature of strings with encoding and various changes to the RTL. Lazarus will change something? Will use FPC new feature of strings or continues using UTF8? Best regards, Marcos Douglas -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus (UTF8) and Windows: SysToUTF8, UTF8ToSys... Is there a better solution?
On Mon, 16 Dec 2013 13:43:41 -0200 Marcos Douglas m...@delfire.net wrote: [...] The problem is not specific to the LCL. The problem is using libraries with different encodings. Of course! But I'm using Lazarus and... LCL... so, I'm searching a better way to continue programming without concern about these problems -- at least decrease. You are not alone. Just for clarify: I'm not judging the LCL or whatever. I'm only searching a solution to my problems. If I can help the Lazarus team, in a near future, would be great. You are welcome. The LCL uses one encoding on all platforms, while still using native widgetsets and native file handles. That was already a big step to decrease the amount of conversions. And many packages using the LCL followed that approach. That further decreased conversions. The big missing piece in the puzzle is the RTL. Now FPC has extended 'string' and is adapting the RTL for unicode. Of course this does not magically solve the general problem. All libraries must be adapted including the LCL. Question: After the new FPC version is released, how Lazarus will work together FPC Unicode? What do you mean with FPC Unicode. The new compiler feature of strings with encoding and various changes to the RTL or the idea to release a FPC flavor with dotted unitnames and String=UnicodeString? I mean new compiler feature of strings with encoding and various changes to the RTL. Lazarus will change something? Will use FPC new feature of strings or continues using UTF8? One of the new FPC strings is UTF8String. So for compatibility the first step is to use that. That is not yet complete. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus directives
On Mon, 16 Dec 2013 14:40:59 + Mark Morgan Lloyd markmll.laza...@telemetry.co.uk wrote: [...] Would it be possible to add %todo as an alternative to todo:, to reduce proliferation of multiple formats? Do you mean like this: http://xkcd.com/927/ Well yes :-) But if %directive is being adopted as a standard, I'd suggest that encouraging the migration of TODO: to that form would be desirable. How do yo want to encourage that? Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus directives
On Mon, 16 Dec 2013 18:25:22 +0100 Mattias Gaertner nc-gaert...@netcologne.de wrote: How do yo want to encourage that? Deprecation in the next version of Lazarus. Removal in the one after that. R. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus directives
On Mon, 16 Dec 2013 18:41:35 +0100 Reimar Grabowski reimg...@web.de wrote: On Mon, 16 Dec 2013 18:25:22 +0100 Mattias Gaertner nc-gaert...@netcologne.de wrote: How do yo want to encourage that? Deprecation in the next version of Lazarus. Removal in the one after that. Deprecation and removal is 'discouraging'. And what would be the reason to remove todo:? Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus directives
On Mon, 16 Dec 2013 19:05:49 +0100 Mattias Gaertner nc-gaert...@netcologne.de wrote: Deprecation and removal is 'discouraging'. I always feel encouraged to use new features/syntax/we and discouraged to use the old if I know that the old will stop working. If you favor 'modern encouragement': Advertise with 'Shiny, new, todo 2.0' or 'todo: is dead, long live %todo' or 'More %todo than ever' on the main page. Write a blog post about it, inform the masses how great the new '%todo' is and make a youtube video about it. But I think deprecation and removal are good enough to encourage people. And what would be the reason to remove todo:? Changed syntax to make it consistent with other directives? Old code should not be affected as the old todos should be done by the time of change. ;) R. Disclaimer: I don't favor any one of the todos over the other. You asked how to encourage usage and that's how I would do it. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus directives
Mattias Gaertner wrote: On Mon, 16 Dec 2013 14:40:59 + Mark Morgan Lloyd markmll.laza...@telemetry.co.uk wrote: [...] Would it be possible to add %todo as an alternative to todo:, to reduce proliferation of multiple formats? Do you mean like this: http://xkcd.com/927/ Well yes :-) But if %directive is being adopted as a standard, I'd suggest that encouraging the migration of TODO: to that form would be desirable. How do yo want to encourage that? My suggestion would be to change the IDE to recognise %todo as well as todo:, in three releases time (1.8?) have the IDE insert new items favouring %todo, and at 2.0- which is presumably not on anybody's radar at the moment- rewrite todo: as %todo. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus (UTF8) and Windows: SysToUTF8, UTF8ToSys... Is there a better solution?
On Mon, Dec 16, 2013 at 3:22 PM, Mattias Gaertner nc-gaert...@netcologne.de wrote: On Mon, 16 Dec 2013 13:43:41 -0200 Marcos Douglas m...@delfire.net wrote: [...] The problem is not specific to the LCL. The problem is using libraries with different encodings. Of course! But I'm using Lazarus and... LCL... so, I'm searching a better way to continue programming without concern about these problems -- at least decrease. You are not alone. Just for clarify: I'm not judging the LCL or whatever. I'm only searching a solution to my problems. If I can help the Lazarus team, in a near future, would be great. You are welcome. The LCL uses one encoding on all platforms, while still using native widgetsets and native file handles. That was already a big step to decrease the amount of conversions. And many packages using the LCL followed that approach. That further decreased conversions. The big missing piece in the puzzle is the RTL. Now FPC has extended 'string' and is adapting the RTL for unicode. I think use one encoding on all platforms is good, however Windows uses UTF-16. All string from/to Windows needs to be converted, right? Is this not a penalty for Windows platform? What coding FPC's team chose to use on Windows in the next release of the compiler, UTF-16? Of course this does not magically solve the general problem. All libraries must be adapted including the LCL. Of course. Question: After the new FPC version is released, how Lazarus will work together FPC Unicode? What do you mean with FPC Unicode. The new compiler feature of strings with encoding and various changes to the RTL or the idea to release a FPC flavor with dotted unitnames and String=UnicodeString? I mean new compiler feature of strings with encoding and various changes to the RTL. Lazarus will change something? Will use FPC new feature of strings or continues using UTF8? One of the new FPC strings is UTF8String. So for compatibility the first step is to use that. That is not yet complete. Lazarus uses only 'string', not UTF8String, UnicodeString, RawByteString, etc. This will change? Marcos Douglas -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Jedi Code Format barfs on an Octal number
On 12/16/2013 2:58 AM, Michael Van Canneyt wrote: On Sun, 15 Dec 2013, waldo kitty wrote: On 12/15/2013 6:18 PM, brian wrote: The bug is a simple one, JCF won't accept the '' syntax for an octal number. There's absolutely no doubt that this was the problem, all of my units formatted correctly except for the one with the two calls to FpChmod in it, and that one formatted correctly when I changed the octal number to its decimal equivalent. FWIW: the octal format of specifying numbers is relatively new and IIRC only available in FPC mode... 'relatively new' is relative. I think octal notation has been available in FPC since many years. yes, but it is not available in TP/BP and (IIRC) Delphi... for many out here in the wilds, that qualifies ;) in any case, yes, it is a relative observation of relativistic properties ;) -- NOTE: No off-list assistance is given without prior approval. Please keep mailing list traffic on the list unless private contact is specifically requested and granted. --- This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Jedi Code Format barfs on an Octal number
Am 2013-12-17 02:42, schrieb waldo kitty: yes, but it is not available in TP/BP and (IIRC) Delphi... I am wondering why octal numbers are not allowed in these modes. Why not allow them in all modes? I can't see how this would cause problems. It would only avoid them. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus