[fpc-pascal] SetCodePage in older FPC 3.0.4

2019-05-28 Thread Alexey Tor.
I am making small unit https://github.com/alexey-t/aencoding so I need to know: a) will it work on FPC 3.0.4? do I need to use {$ifdef}? b) my trick to set CP_UTF8 at the end of FromTo function is ok? c) what encoding numbers (e.g. 936, 950) exist in FPC 3.3 but didn't exist in FPC

Re: [fpc-pascal] Using docker to build software

2019-05-28 Thread leledumbo via fpc-pascal
> I am curious to know if there is someone out there that have tried to > use Docker (https://www.docker.com) containers to build fpc applications? Search docker hub, you will find a lot of them, either fpc only, with lazarus, single target or even cross compiling ready. -- Sent from:

[fpc-pascal] Using docker to build software

2019-05-28 Thread Torsten Bonde Christiansen
Hi List. I am curious to know if there is someone out there that have tried to use Docker (https://www.docker.com) containers to build fpc applications? I have 3 applications in a suite that I am thinking of experimenting with, see if I can create an image containing eg. Ubuntu linux, FPC,

Re: [fpc-pascal] Convert codepages back to UTF8

2019-05-28 Thread Sven Barth via fpc-pascal
Alexey Tor. schrieb am Di., 28. Mai 2019, 14:44: > Ok, I got it. But I wonder: if my code changes codepage of a "string" to > e.g. 1250, will all Lazarus string functions work ok with such changed > string? For ex, will Pos('Петя', s) work? > Depends on what you do with the returned value.

Re: [fpc-pascal] Convert codepages back to UTF8

2019-05-28 Thread Martok
> Although be advised that if your SystemCodePage is not a Unicode > codepage, there > will be data loss due to (sometimes unexpected) internal conversions, > regardless > of the current dynamic string code page. > > > As Graeme wrote that shouldn't be the case when converting to

[fpc-pascal] Convert codepages back to UTF8

2019-05-28 Thread Alexey Tor.
Ok, I got it. But I wonder: if my code changes codepage of a "string" to e.g. 1250, will all Lazarus string functions work ok with such changed string? For ex, will Pos('Петя', s) work? -- Regards, Alexey ___ fpc-pascal maillist -

Re: [fpc-pascal] Convert codepages back to UTF8

2019-05-28 Thread Sven Barth via fpc-pascal
Martok schrieb am Mo., 27. Mai 2019, 15:14: > Am 27.05.2019 um 14:30 schrieb Sven Barth via fpc-pascal: > > Alexey Tor. > > schrieb am Mo., 27. Mai 2019, 13:15: > > > > LazUtils.LConvEncoding can convert utf8 to codepage (not many > codepages) > > and vice versa. >

Re: [fpc-pascal] Convert codepages back to UTF8

2019-05-28 Thread Graeme Geldenhuys
On 27/05/2019 2:13 pm, Martok wrote: > there > will be data loss due to (sometimes unexpected) internal conversions, Surely that must be a bug then. Converting anything to a UTF-x encoding should be lossless as Unicode is the only standard that supports ALL languages. Regards, Graeme --