Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2013-03

Unicode String Manager on darwin

2 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Louis Salkind

With the fpc 2.7.1 trunk, the following simple program does not work under darwin unless I also include the unit cwstring:

program project1;
{$mode objfpc}{$H+}
uses sysutils;            // also needs the unit cwstring to work under
darwin
function toupper(const s: WideString): WideString;
begin
   result := WideUpperCase(s);
end;
begin
   writeln(toupper('hello world'));
end.

---

Is this the intended behavior?

Upon running the program above I get the error:

This binary has no unicodestrings support compiled in. Recompile the application with a unicodestrings-manager in the program uses clause.
An unhandled exception occurred at $0001EECB:
ENoWideStringSupport: SIGQUIT signal received.
$0001EECB GENERICUNICODECASE, line 2181 of
/Users/lou/fpc/fpc/rtl/darwin/../bsd/system.pp

Reply by email

Sven Barth
to Louis Salkind
Louis Salkind wrote 21 lines
With the fpc 2.7.1 trunk, the following simple program does not work under darwin unless I also include the unit cwstring: program project1; {$mode objfpc}{$H+} uses sysutils; // also needs the unit cwstring to work under darwin function toupper(const s: WideString): WideString; begin result := WideUpperCase(s); end; begin writeln(toupper('hello world')); end. --- Is this the intended behavior?

Yes, this is intended behavior on Unix based systems, because this will cause the code to link to the C library (though one can debate whether this makes any difference on Mac OS X, where we link to the C library anyway...).

Regards,
Sven

Reply by email