Sign in Join

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

Mailing lists / fpc-pascal / 2012-06

Codepage: UTF-8 code greater than 65535 found

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

luciano de souza

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?

Luciano

Mattias Gaertner
to luciano de souza
Show quoted text 32 lines
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