Re: [fpc-devel] UTF-8 string literals

2017-05-11 Thread Mattias Gaertner
On Thu, 11 May 2017 14:52:37 +0300 Juha Manninen wrote: > On Wed, May 10, 2017 at 7:00 PM, Martok wrote: > > I just searched for "Unicode". > > I wanted to delete the old page > http://wiki.freepascal.org/LCL_Unicode_Support > completely

Re: [fpc-devel] UTF-8 string literals

2017-05-11 Thread Juha Manninen
On Wed, May 10, 2017 at 7:00 PM, Martok wrote: > I just searched for "Unicode". I wanted to delete the old page http://wiki.freepascal.org/LCL_Unicode_Support completely but I don't know how to do it so I just made it empty. Anybody knows how to delete it? I also

Re: [fpc-devel] UTF-8 string literals

2017-05-11 Thread Michael Van Canneyt
On Wed, 10 May 2017, Martok wrote: But apparently everything is rainbows and unicorns and there is absolutely no problem with the documentation at all, so I guess this week-long discussion here never happened anyway. This is not quite correct. I have proposed to add a table to the official

Re: [fpc-devel] UTF-8 string literals

2017-05-11 Thread Martok
That's the one I also think Sven was talking about. I just searched for "Unicode". Michael's proposal comes up, but I guess the title is fairly obvious. But apparently everything is rainbows and unicorns and there is absolutely no problem with the documentation at all, so I guess this week-long

Re: [fpc-devel] UTF-8 string literals

2017-05-10 Thread Mattias Gaertner
On Tue, 9 May 2017 14:59:16 +0200 Michael Schnell wrote: > On 06.05.2017 09:39, Sven Barth via fpc-devel wrote: > > That might be the one from Michael Schnell. > Very unlikely, as this text does not mention anything about how a source > file byte sequence is converted in a

Re: [fpc-devel] UTF-8 string literals

2017-05-10 Thread Michael Schnell
On 06.05.2017 09:39, Sven Barth via fpc-devel wrote: That might be the one from Michael Schnell. Very unlikely, as this text does not mention anything about how a source file byte sequence is converted in a String constant / literal. -Michael ___

Re: [fpc-devel] UTF-8 string literals

2017-05-10 Thread Michael Schnell
On 06.05.2017 09:39, Sven Barth via fpc-devel wrote: That might be the one from Michael Schnell. Probably it should be marked with a big, fat warning that it's merely a user's suggestion and nothing official. I hope it is absolutely clear in the text that this is only a suggestion and not

Re: [fpc-devel] UTF-8 string literals

2017-05-08 Thread Martok
> That might be the one from Michael Schnell. Probably it should be marked with > a > big, fat warning that it's merely a user's suggestion and nothing official. Not even that. This one looks relatively obvious to me ;) I've filed a bug as for

Re: [fpc-devel] UTF-8 string literals

2017-05-07 Thread Sven Barth via fpc-devel
On 07.05.2017 14:16, Marco van de Voort wrote: > In our previous episode, Sven Barth via fpc-devel said: Is there a plan to fix it? >>> >>> Now it is fixed :D (revision 36116; maybe we should merge that to fixes >> once I or someone else tested a big endian target) >> >> Okay, it works

Re: [fpc-devel] UTF-8 string literals

2017-05-07 Thread Marco van de Voort
In our previous episode, Sven Barth via fpc-devel said: > > > Is there a plan to fix it? > > > > Now it is fixed :D (revision 36116; maybe we should merge that to fixes > once I or someone else tested a big endian target) > > Okay, it works correctly on big endian targets as well (and Mac OS X

Re: [fpc-devel] UTF-8 string literals

2017-05-07 Thread Sven Barth via fpc-devel
Am 05.05.2017 16:08 schrieb "Sven Barth" : > > Am 05.05.2017 16:03 schrieb "Juha Manninen" : > > > > On Fri, May 5, 2017 at 2:53 PM, Mattias Gaertner > > wrote: > > > 1. When using a character outside BMP FPC stops

Re: [fpc-devel] UTF-8 string literals

2017-05-07 Thread Michael Van Canneyt
On Sun, 7 May 2017, Mattias Gaertner wrote: On Sun, 7 May 2017 10:27:58 +0200 Florian Klaempfl wrote: [...] 2. What would happen then the other way around? When casting the string constant to a PUnicodeChar (what probably a lot of delphi code does)? Good point.

Re: [fpc-devel] UTF-8 string literals

2017-05-07 Thread Mattias Gaertner
On Sun, 7 May 2017 10:27:58 +0200 Florian Klaempfl wrote: >[...] > 2. What would happen then the other way around? When casting the string > constant to a PUnicodeChar (what probably a lot of delphi code does)? Good point. >[...] > I think, it would nice if Michael (v.

Re: [fpc-devel] UTF-8 string literals

2017-05-07 Thread Florian Klaempfl
Am 05.05.2017 um 13:53 schrieb Mattias Gaertner: > Hi, > > AFAIK FPC stores UTF-8 string literals (-Fcutf8) -Fc tells the compiler only the encoding of the source code page, it says nothing how string constant shall be encoded. > as widestrings > instead of UTF8String. Please correct me if I'm

Re: [fpc-devel] UTF-8 string literals

2017-05-06 Thread Mattias Gaertner
On Fri, 5 May 2017 16:08:41 +0200 Sven Barth via fpc-devel wrote: >[...] > Now it is fixed :D (revision 36116; maybe we should merge that to fixes > once I or someone else tested a big endian target) Thank You! Mattias

Re: [fpc-devel] UTF-8 string literals

2017-05-06 Thread Sven Barth via fpc-devel
Am 06.05.2017 08:18 schrieb "Martok" : > PS: adding to the discussion over on the Lazarus ML: I just found a fourth wiki > page describing a slightly different Unicode support. This is getting ridiculous. That might be the one from Michael Schnell. Probably it should be

Re: [fpc-devel] UTF-8 string literals

2017-05-06 Thread Martok
> You should weigh the advantages you outline here against the disadvantages of > no longer knowing how string literals will be encoded. As a programmer, either I don't want to know (declared const without giving explicit type) or I do, then I did declare it correctly: {$codepage utf8} var u:

Re: [fpc-devel] UTF-8 string literals

2017-05-05 Thread Michael Van Canneyt
On Fri, 5 May 2017, Sven Barth via fpc-devel wrote: Am 05.05.2017 15:55 schrieb "Michael Van Canneyt" : On Fri, 5 May 2017, Mattias Gaertner wrote: On Fri, 5 May 2017 14:30:32 +0200 (CEST) Michael Van Canneyt wrote: [...] AFAIK FPC

Re: [fpc-devel] UTF-8 string literals

2017-05-05 Thread Sven Barth via fpc-devel
Am 05.05.2017 15:55 schrieb "Michael Van Canneyt" : > > > > On Fri, 5 May 2017, Mattias Gaertner wrote: > >> On Fri, 5 May 2017 14:30:32 +0200 (CEST) >> Michael Van Canneyt wrote: >> >>> [...] >>> > AFAIK FPC stores UTF-8 string literals (-Fcutf8)

Re: [fpc-devel] UTF-8 string literals

2017-05-05 Thread Michael Van Canneyt
On Fri, 5 May 2017, Mattias Gaertner wrote: On Fri, 5 May 2017 15:55:32 +0200 (CEST) Michael Van Canneyt wrote: On Fri, 5 May 2017, Mattias Gaertner wrote: > On Fri, 5 May 2017 14:30:32 +0200 (CEST) > Michael Van Canneyt wrote: > >> [...]

Re: [fpc-devel] UTF-8 string literals

2017-05-05 Thread Mattias Gaertner
On Fri, 5 May 2017 15:55:32 +0200 (CEST) Michael Van Canneyt wrote: > On Fri, 5 May 2017, Mattias Gaertner wrote: > > > On Fri, 5 May 2017 14:30:32 +0200 (CEST) > > Michael Van Canneyt wrote: > > > >> [...] > >> > AFAIK FPC stores UTF-8

Re: [fpc-devel] UTF-8 string literals

2017-05-05 Thread Sven Barth via fpc-devel
Am 05.05.2017 16:03 schrieb "Juha Manninen" : > > On Fri, May 5, 2017 at 2:53 PM, Mattias Gaertner > wrote: > > 1. When using a character outside BMP FPC stops with: > > Error: UTF-8 code greater than 65535 found > > For example: > > const

Re: [fpc-devel] UTF-8 string literals

2017-05-05 Thread Michael Van Canneyt
On Fri, 5 May 2017, Juha Manninen wrote: On Fri, May 5, 2017 at 2:53 PM, Mattias Gaertner wrote: 1. When using a character outside BMP FPC stops with: Error: UTF-8 code greater than 65535 found For example: const Eyes = ''; I copy a related post from Lazarus

Re: [fpc-devel] UTF-8 string literals

2017-05-05 Thread Juha Manninen
On Fri, May 5, 2017 at 2:53 PM, Mattias Gaertner wrote: > 1. When using a character outside BMP FPC stops with: > Error: UTF-8 code greater than 65535 found > For example: > const Eyes = ''; I copy a related post from Lazarus list by myself and Sven Barth. It belongs

Re: [fpc-devel] UTF-8 string literals

2017-05-05 Thread Michael Van Canneyt
On Fri, 5 May 2017, Mattias Gaertner wrote: On Fri, 5 May 2017 14:30:32 +0200 (CEST) Michael Van Canneyt wrote: [...] > AFAIK FPC stores UTF-8 string literals (-Fcutf8) as widestrings > instead of UTF8String. Please correct me if I'm wrong. To make sure I was

Re: [fpc-devel] UTF-8 string literals

2017-05-05 Thread Mattias Gaertner
On Fri, 5 May 2017 14:30:32 +0200 (CEST) Michael Van Canneyt wrote: >[...] > > AFAIK FPC stores UTF-8 string literals (-Fcutf8) as widestrings > > instead of UTF8String. Please correct me if I'm wrong. > > > > This has several side effects: > > > > 1. When using a

Re: [fpc-devel] UTF-8 string literals

2017-05-05 Thread Michael Van Canneyt
On Fri, 5 May 2017, Mattias Gaertner wrote: Hi, AFAIK FPC stores UTF-8 string literals (-Fcutf8) as widestrings instead of UTF8String. Please correct me if I'm wrong. This has several side effects: 1. When using a character outside BMP FPC stops with: Error: UTF-8 code greater than 65535