[fpc-pascal] FPC Unicode / CodePage aware strings

2015-12-10 Thread Graeme Geldenhuys
Hi, "official" Unicode support in FPC has been discussed for so long (years), that I came up with my own solution for fpGUI since 2007 (LCL did the similar) and it still works 100% and well tested. But now I want to learn what the FPC team finally came up with in FPC 3.0. Is there some white

Re: [fpc-pascal] FPC Unicode / CodePage aware strings

2015-12-10 Thread Jonas Maebe
Graeme Geldenhuys wrote on Thu, 10 Dec 2015: Is there some white paper, blog post, awesome MvC article that explains it all. And how it compares to Delphi's Unicode support (if this is important - though I don't use Delphi at all any more).

Re: [fpc-pascal] FPC Unicode / CodePage aware strings

2015-12-10 Thread Graeme Geldenhuys
On 2015-12-10 10:35, Graeme Geldenhuys wrote: > Now I try and run the binary and get the following error. > > [t2]$ ./project1 > This binary has no unicodestrings support compiled in. > Recompile the application with a unicodestrings-manager in the program > uses clause. > An unhandled exception

Re: [fpc-pascal] FPC Unicode / CodePage aware strings

2015-12-10 Thread Graeme Geldenhuys
On 2015-12-10 11:10, Martin Schreiber wrote: > Try {$codepage utf8}. It made no difference to the console output. Regards, - Graeme - ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] FPC Unicode / CodePage aware strings

2015-12-10 Thread Graeme Geldenhuys
On 2015-12-10 11:16, Jonas Maebe wrote: > There is no such thing as "official FPC Unicode". We added support for > codepage-aware ansistrings. We added unicodestring overloads for a Does the type UnicodeString always mean UTF-16 encoded text (like it's Delphi counterpart)? If so, that

Re: [fpc-pascal] FPC Unicode / CodePage aware strings

2015-12-10 Thread Mattias Gaertner
On Thu, 10 Dec 2015 12:17:28 +0100 Jonas Maebe wrote: >[...] > > Try {$codepage utf8}. > > That won't change anything, because {$mode delphiunicode} implies "use > the default system code page to interpret the source code", and that's > UTF-8 on his system. Does

Re: [fpc-pascal] FPC Unicode / CodePage aware strings

2015-12-10 Thread Jonas Maebe
Mattias Gaertner wrote on Thu, 10 Dec 2015: On Thu, 10 Dec 2015 12:17:28 +0100 Jonas Maebe wrote: That won't change anything, because {$mode delphiunicode} implies "use the default system code page to interpret the source code", and that's UTF-8 on his system.

Re: [fpc-pascal] FPC Unicode / CodePage aware strings

2015-12-10 Thread Mattias Gaertner
On Thu, 10 Dec 2015 12:02:31 + Graeme Geldenhuys wrote: > On 2015-12-10 11:16, Jonas Maebe wrote: > > There is no such thing as "official FPC Unicode". We added support for > > codepage-aware ansistrings. We added unicodestring overloads for a > > Does the

Re: [fpc-pascal] FPC Unicode / CodePage aware strings

2015-12-10 Thread Graeme Geldenhuys
On 2015-12-10 09:50, Jonas Maebe wrote: > > Graeme Geldenhuys wrote on Thu, 10 Dec 2015: > >> Is there some white paper, blog post, awesome MvC article that explains >> it all. And how it compares to Delphi's Unicode support (if this is >> important - though I don't use Delphi at all any more).

Re: [fpc-pascal] FPC Unicode / CodePage aware strings

2015-12-10 Thread Graeme Geldenhuys
On 2015-12-10 10:29, Jonas Maebe wrote: > The language feature is implemented in a Delphi 2009-compatible way > (although some Delphi-specific behaviour is only activated in {$mode > delphiunicode}). Okay, so forget Delphi 2009 compatibility for the moment (I don't use Delphi). So does this

Re: [fpc-pascal] FPC Unicode / CodePage aware strings

2015-12-10 Thread Martin Schreiber
On Thursday 10 December 2015 12:01:49 Graeme Geldenhuys wrote: > > === > program project1; > > {$mode delphiunicode}{$H+} > Try {$codepage utf8}. Martin ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] FPC Unicode / CodePage aware strings

2015-12-10 Thread Jonas Maebe
Graeme Geldenhuys wrote on Thu, 10 Dec 2015: On 2015-12-10 10:29, Jonas Maebe wrote: The language feature is implemented in a Delphi 2009-compatible way (although some Delphi-specific behaviour is only activated in {$mode delphiunicode}). Okay, so forget Delphi 2009 compatibility for the

Re: [fpc-pascal] FPC Unicode / CodePage aware strings

2015-12-10 Thread Jonas Maebe
Martin Schreiber wrote on Thu, 10 Dec 2015: On Thursday 10 December 2015 12:01:49 Graeme Geldenhuys wrote: === program project1; {$mode delphiunicode}{$H+} Try {$codepage utf8}. That won't change anything, because {$mode delphiunicode} implies "use the default

Re: [fpc-pascal] FPC Unicode / CodePage aware strings

2015-12-10 Thread Vincent Snijders
2015-12-10 11:18 GMT+01:00 Graeme Geldenhuys : > On 2015-12-10 09:50, Jonas Maebe wrote: > > > > Graeme Geldenhuys wrote on Thu, 10 Dec 2015: > > Tried to compile that with FPC (yes, I included the new "Character" unit > in uses clause) and I get a couple of

Re: [fpc-pascal] FPC Unicode / CodePage aware strings

2015-12-10 Thread Jonas Maebe
Graeme Geldenhuys wrote on Thu, 10 Dec 2015: On 2015-12-10 09:50, Jonas Maebe wrote: http://wiki.freepascal.org/FPC_New_Features_3.0#Support_for_codepage-aware_strings Thanks, but here's the problem. The wiki says FPC 3.0 is now Delphi 2009 string compatible. So I starting reading the

Re: [fpc-pascal] FPC Unicode / CodePage aware strings

2015-12-10 Thread Graeme Geldenhuys
On 2015-12-10 10:22, Vincent Snijders wrote: > And mode DelphiUnicode? Oh, yet another compiler mode. Okay, just tried, and got these warnings, but the project at least compiled and generated a binary. Compile Project, Target: project1: Success, Warnings: 5 project1.lpr(37,47) Warning: Implicit

Re: [fpc-pascal] FPC Unicode / CodePage aware strings

2015-12-10 Thread Jonas Maebe
Mattias Gaertner wrote on Thu, 10 Dec 2015: If you have a working Unicode solution there is no reason to abandon it. Exactly. There is absolutely no point in changing your code to unicodestring in reaction to these changes (nor in reaction to future changes an sich, if we can help it).

Re: [fpc-pascal] FPC Unicode / CodePage aware strings

2015-12-10 Thread Graeme Geldenhuys
On 2015-12-10 12:18, Mattias Gaertner wrote: > If you have a working Unicode solution there is no reason to abandon it. > The FPC team did a great job keeping compatibility (contrary to Delphi). Indeed - from what I have tested and seen using FPC 3.0 with fpGUI. So kudos to the FPC team for