On Thu, 13 Jun 2013, Sven Barth wrote:
Am 12.06.2013 17:36, schrieb Michael Van Canneyt:
On Wed, 12 Jun 2013, Marco van de Voort wrote:
On Wed, Jun 12, 2013 at 10:55:24AM +0200, Michael Schnell wrote:
On 06/10/2013 08:55 AM, Michael Van Canneyt wrote:
Where is UNICODE defined ?
Isn't the define "UNICODE" a heritage from Delphi (> version xyz) ?
Yes, and if you chose the explicit compatibility mode for that version,
$mode delphiunicode, it _is_ defined.
Now why on earth would we do that ? We don't define VERXYZ either in mode
delphi ??
The motivation was exactly the point that Delphi versions where
String=UnicodeString define "Unicode" while former versions do not, so the
definition of the UNICODE switch was linked to modeswitch unicodestrings (and
thus to mode delphiunicode). This was also the reason why WinCE compilation
got broken (it defines UNICODE by default which got undefined after mode
ObjFPC was encountered) and I added the FPC_OS_UNICODE define.
All the more reason not to try to emulate Delphi defines.
Currently the following can be found:
FPC_HAS_UNICODESTRING
FPC_WIDESTRING_EQUAL_UNICODESTRING
FPC_UNICODESTRINGS
UNICODE
The UNICODE define is simply superfluous. Those that need it can do a
{$IFDEF FPC_UNICODESTRINGS}
{$DEFINE UNICODE}
{$ENDIF}
And they'll need defines anyway because widestring <> unicodestring on windows.
But it is all water under the bridge.
Michael.
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus