<p>Am 05.05.2017 16:08 schrieb "Sven Barth" <<a href="mailto:pascaldragon@googlemail.com">pascaldragon@googlemail.com</a>>:<br>
><br>
> Am 05.05.2017 16:03 schrieb "Juha Manninen" <<a href="mailto:juha.manninen62@gmail.com">juha.manninen62@gmail.com</a>>:<br>
> ><br>
> > On Fri, May 5, 2017 at 2:53 PM, Mattias Gaertner<br>
> > <<a href="mailto:nc-gaertnma@netcologne.de">nc-gaertnma@netcologne.de</a>> wrote:<br>
> > > 1. When using a character outside BMP FPC stops with:<br>
> > > Error: UTF-8 code greater than 65535 found<br>
> > > For example:<br>
> > > const Eyes = '👀';<br>
> ><br>
> > I copy a related post from Lazarus list by myself and Sven Barth.<br>
> > It belongs here:<br>
> ><br>
> > On Fri, May 5, 2017 at 3:56 PM, Sven Barth via Lazarus<br>
> > <<a href="mailto:lazarus@lists.lazarus-ide.org">lazarus@lists.lazarus-ide.org</a>> wrote:<br>
> > > That is mainly due to the compiler not supporting surrogate pairs for the<br>
> > > UTF-8 -> UTF-16 conversion. If it would support them, then there wouldn't be<br>
> > > a problem anymore...<br>
> ><br>
> > That is a serious bug. Getting codepoints right is the absolute<br>
> > minimum requirement for Unicode support. Surrogate pairs are the<br>
> > UTF-16 equivalent of multi-byte codepoints in UTF-8.<br>
> ><br>
> > Now I understand this was not caused by our UTF-8 run-time switch<br>
> > "hack". It is a plain bug in FPC.<br>
> > Is there a plan to fix it?<br>
><br>
> Now it is fixed :D (revision 36116; maybe we should merge that to fixes once I or someone else tested a big endian target)</p>
<p>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.</p>
<p>Regards,<br>
Sven</p>