Re: [fpc-pascal] FPC 3 regression: cannot use TStringList for UTF-8 data any more?

2016-04-13 Thread Michael Van Canneyt
On Wed, 13 Apr 2016, Michael Schnell wrote: On 04/13/2016 09:04 AM, Michael Van Canneyt wrote: It uses the DefaultSystemcodepage. If the system codepage is UTF8, then it will use UTF8. (Sorry for replying yet another answer to the same message of yours) http://wiki.freepascal.org/Better_U

Re: [fpc-pascal] FPC 3 regression: cannot use TStringList for UTF-8 data any more?

2016-04-13 Thread Michael Schnell
On 04/13/2016 09:04 AM, Michael Van Canneyt wrote: It uses the DefaultSystemcodepage. If the system codepage is UTF8, then it will use UTF8. (Sorry for replying yet another answer to the same message of yours) http://wiki.freepascal.org/Better_Unicode_Support_in_Lazarus says: On the other han

Re: [fpc-pascal] FPC 3 regression: cannot use TStringList for UTF-8 data any more?

2016-04-13 Thread Michael Schnell
On 04/13/2016 09:04 AM, Michael Van Canneyt wrote: It uses the DefaultSystemcodepage. If the system codepage is UTF8, then it will use UTF8. Thanks for the enlightenment. Am I right assuming that the DefaultSystemcodepage is determined when compiling the RTL and/or the compiler) ? (As the d

[fpc-pascal] A better way?

2016-04-13 Thread Ryan Joseph
The most annoying problem I have with Pascal currently is with circular unit dependanices and “global” classes that need to be referenced from many units. In other languages I would make a forward declaration of the class in one file then implement it in another file so that all files could ref

Re: [fpc-pascal] Initialization in Shared Libraries

2016-04-13 Thread Sven Barth
On 13.04.2016 21:30, Mazola Winstrol wrote: > 2016-04-13 15:56 GMT-03:00 Jonas Maebe >: > > > And hence you can just initialise those variables in the > initialization section of the library and finalize them (if > necessary) in the finalization sect

Re: [fpc-pascal] Initialization in Shared Libraries

2016-04-13 Thread Mazola Winstrol
2016-04-13 15:56 GMT-03:00 Jonas Maebe : > > And hence you can just initialise those variables in the initialization > section of the library and finalize them (if necessary) in the finalization > section of the library. > > Thanks! Can i use class constructors in shared libraries? Does unit's in

Re: [fpc-pascal] Initialization in Shared Libraries

2016-04-13 Thread Jonas Maebe
Michael Van Canneyt wrote: On Wed, 13 Apr 2016, Mazola Winstrol wrote: I writting a cross-platform shared library (.dll, .so). I need to initialize some global variables. As the free pascal doesn't support library events (PROCESS_ATTACH, PROCESS_DETACH), what is the correct to way to do this

Re: [fpc-pascal] Initialization in Shared Libraries

2016-04-13 Thread Mazola Winstrol
2016-04-13 15:52 GMT-03:00 Michael Van Canneyt : > > > On Wed, 13 Apr 2016, Mazola Winstrol wrote: > > Hello list, >> >> I writting a cross-platform shared library (.dll, .so). I need to >> initialize some global variables. >> >> As the free pascal doesn't support library events (PROCESS_ATTACH, >

Re: [fpc-pascal] Initialization in Shared Libraries

2016-04-13 Thread Michael Van Canneyt
On Wed, 13 Apr 2016, Mazola Winstrol wrote: Hello list, I writting a cross-platform shared library (.dll, .so). I need to initialize some global variables. As the free pascal doesn't support library events (PROCESS_ATTACH, PROCESS_DETACH), what is the correct to way to do this? It does, bu

[fpc-pascal] Initialization in Shared Libraries

2016-04-13 Thread Mazola Winstrol
Hello list, I writting a cross-platform shared library (.dll, .so). I need to initialize some global variables. As the free pascal doesn't support library events (PROCESS_ATTACH, PROCESS_DETACH), what is the correct to way to do this? best ragrds ___ f

Re: [fpc-pascal] TP lex change input buffer

2016-04-13 Thread leledumbo
> I'm using TP lex in my application and I would like to change the input buffer from using files to (memory) strings. What is the supposed way to do this? >From the comments: "The variables yyinput and yyoutput are the text files which are used by the lexical analyzer. By default, they are assign

Re: [fpc-pascal] FPC 3 regression: cannot use TStringList for UTF-8 data any more?

2016-04-13 Thread Michael Van Canneyt
On Tue, 12 Apr 2016, Michael Schnell wrote: On 04/04/2016 11:27 AM, Juha Manninen wrote: Just use the new UTF-8 mode provided by Lazarus and remove all explicit conversion functions. http://wiki.freepascal.org/Better_Unicode_Support_in_Lazarus I just did some tests and it seems that TStringL

[fpc-pascal] TP lex change input buffer

2016-04-13 Thread Darius Blaszyk
Hi, I'm using TP lex in my application and I would like to change the input buffer from using files to (memory) strings. What is the supposed way to do this? Currently I have made a local copy of lexlib and modified the get_char (and friends) routine. However this does not seem to be the ideal way

Re: [fpc-pascal] FPC 3 regression: cannot use TStringList for UTF-8 data any more?

2016-04-13 Thread Michael Schnell
On 04/04/2016 11:27 AM, Juha Manninen wrote: Just use the new UTF-8 mode provided by Lazarus and remove all explicit conversion functions. http://wiki.freepascal.org/Better_Unicode_Support_in_Lazarus I just did some tests and it seems that TStringList (this is what Tobias is concerned about) (w