[fpc-pascal] Codepage: UTF-8 code greater than 65535 found

Mattias Gaertner nc-gaertnma at netcologne.de
Mon Jun 25 09:30:55 CEST 2012


On Sun, 24 Jun 2012 23:31:38 -0300
luciano de souza <luchyanus at gmail.com> wrote:

> Hello all,
> 
> In order to enable UTF-8 characters, I tried to use it:
> 
> program dvcodepage;
> {$codepage UTF8}
> 
> uses
> Sysutils;
> 
> var
> x: integer;
> 
> BEGIN
> writeln('Digite um número');
> readln(x);
> writeln('O número digitado foi ', x);
> END.
> 
> I really didn't expect errors, but I got the following output:
> 
> Free Pascal Compiler version 2.6.0 [2011/12/25] for i386
> Copyright (c) 1993-2011 by Florian Klaempfl and others
> Target OS: Win32 for i386
> Compiling dvcodepage.pas
> dvcodepage.pas(9,9) Error: UTF-8 code greater than 65535 found
> dvcodepage.pas(11,9) Error: UTF-8 code greater than 65535 found
> dvcodepage.pas(12,4) Fatal: There were 2 errors compiling module, stopping
> Fatal: Compilation aborted
> 
> It's something related to size of integers, but what?
> How to compile this code without errors?

It compiles with 2.6.1.

Mattias



More information about the fpc-pascal mailing list