Re: [fpc-devel] FPC 3.0.2 for SPARC

2017-05-07 Thread John Lee
I've lost track of what are the issues in this thread, but if the tar of
the source files is less than 2G  and you want to transfer it tar I have a
2G or so ftp site that you could use to transfer the tar. Let me know and
I'll send the details via private email to each of you that needs it.
john


On 5 May 2017 at 12:00, Mark Morgan Lloyd  wrote:

> This is something that was discussed on the FPC-Pascal ML but it died.
>
> I am able to build installation bundles for SPARC running Linux (Debian)
> and Solaris (OpenSXCE). The fp IDE works but doesn't have libgdb support,
> and I've got limited time to struggle up the learning curve. Would these be
> of use for the downloads area, which at present only has 2.6.2 and 2.4.2
> respectively?
>
> --
> Mark Morgan Lloyd
> markMLl .AT. telemetry.co .DOT. uk
>
> [Opinions above are the author's, not those of his employers or colleagues]
> ___
> fpc-devel maillist  -  fpc-devel@lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
>
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


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 correctly on big endian targets as well (and Mac OS X 10.4
>> even has valid characters for the console to test with :D ). Thus this
>> change could be merged to 3.0.3.
> 
> Done.

Thanks :)

Regards,
Sven

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] FPC 3.0.2 for SPARC

2017-05-07 Thread Mark Morgan Lloyd

On 05/05/17 16:00, Pierre Muller wrote:


  You probably need to add the -Xn option into the makepack script!


Thanks for the pointer as to where it goes: those last words stopped me 
spending days looking for the appropriate makefile :-)


If I do this it builds successfully:

 *sunos*) MAKE=gmake
EXTRAOPT='-Xn'
 # Use GNU tar if present
 if [ "`which gtar`" != "" ]; then
   TAR=`which gtar`
 fi
 ;;

Should I raise a bug on Mantis for this? can anybody comment on what 
impact this would have on the Intel target for Solaris?


I'll add a note to the existing stuff on the Wiki.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


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 10.4
> even has valid characters for the console to test with :D ). Thus this
> change could be merged to 3.0.3.

Done.
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


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 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 here:
> >
> > On Fri, May 5, 2017 at 3:56 PM, Sven Barth via Lazarus
> >  wrote:
> > > That is mainly due to the compiler not supporting surrogate pairs for
the
> > > UTF-8 -> UTF-16 conversion. If it would support them, then there
wouldn't be
> > > a problem anymore...
> >
> > That is a serious bug. Getting codepoints right is the absolute
> > minimum requirement for Unicode support. Surrogate pairs are the
> > UTF-16 equivalent of multi-byte codepoints in UTF-8.
> >
> > Now I understand this was not caused by our UTF-8 run-time switch
> > "hack". It is a plain bug in FPC.
> > 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 10.4
even has valid characters for the console to test with :D ). Thus this
change could be merged to 3.0.3.

Regards,
Sven
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


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.



[...]
I think, it would nice if Michael (v. C.) prepares some section for the
docs and we comment and help him to improve it.


That would be highly appreciated.


I would be glad to do so, but I need something to start with.

In my reply to Sven I asked if a set of rules exist.

As far as I understand:

- By default, strings are stored internally as UTF-16.
- Unless it is an ascii string, in which case it is stored as plain ascii
- In special cases such as a typecast, the compiler stores them as UTF8 ?

A bit shallow...


Michael.
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


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. C.) prepares some section for the
> docs and we comment and help him to improve it.

That would be highly appreciated.

Mattias
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


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 wrong.
> 
> This has several side effects:
> 
> 1. When using a character outside BMP FPC stops with:
> Error: UTF-8 code greater than 65535 found
> For example:
> const Eyes = '';
> 
> 2. Assigning a UTF-8 literal to an UTF8String requires a
> widestringmanager.
> For example non ISO-8859-1 chars are mangled:
> var u: UTF8String = 'äöüالعَرَبِيَّة';
> 
> 3. PChar on a string literal does not work as expected. You get the
> bytes of a widestring instead.

Well, it depends on what you expect :)

> 
> 
> What would happen if FPC would be extended to store UTF-8
> literals as UTF8String? 
> What are the disadvantages?

1. Backward compatibility. Due to its windows origins and history, the
default unicode encoding in FPC is UTF-16, FPC uses also internally
UTF-16 everywhere.

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)?

3. Personally, I still think, UTF-16 is the "native" unicode type: all
important APIs use UTF-16, for me, UTF-8 is a hack.

What we could do of course is, that if a constant is assigned to a
string with explicit utf-8 encoding, that the compiler does the
conversion at run time. But it complicates things even more. This does
not solve the PChar problem, but I think, when somebody uses unicode
source files and PChar, he is on how own :)

I think, it would nice if Michael (v. C.) prepares some section for the
docs and we comment and help him to improve it.

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel