[fpc-pascal] FPC Unicode / CodePage aware strings

Graeme Geldenhuys mailinglists at geldenhuys.co.uk
Thu Dec 10 12:01:49 CET 2015

On 2015-12-10 10:35, Graeme Geldenhuys wrote:
> Now I try and run the binary and get the following error.
> [t2]$ ./project1
> 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 $000000000044354D:
> ENoWideStringSupport: SIGQUIT signal received.
>   $000000000044354D
> Okay, so I add the "unicodestrings-manager" unit to the program unit's
> uses clause, as the above message suggests.
> Now I can't compile the project...

Okay, I changed my program to a console program. After much searching I
found that "unicodestrings-manager" is not actually a unit. I tried
"cwstrings" instead - the wiki page didn't mention this - and could
compile and run my program.

[t2]$ ./project1
UpCase ù: Ù
ToUpper ù: Ù
UpCase ù: ?
ToUpper ù: ?

The output is not the same as the output from the
"Delphi_and_Unicode.pdf" example.

Source code:
The .pas unit is stored as a UTF-8 encoded file, and the program was run
in mate-terminal and xterm, showing the same output as above.

program project1;

{$mode delphiunicode}{$H+}

  Classes, SysUtils, Character;

  ch1: Char;
  ch2: AnsiChar;
  ch1 := 'ù';
  Writeln('UpCase ù: ' + UpCase(ch1));
  Writeln('ToUpper ù: ' + ToUpper (ch1));
  ch2 := 'ù';
  Writeln('UpCase ù: ' + UpCase(ch2));
  Writeln('ToUpper ù: ' +  ToUpper(ch2));

  - Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal

My public PGP key:  http://tinyurl.com/graeme-pgp

More information about the fpc-pascal mailing list