[fpc-pascal] Different default ASCII tablein fpc IDE with SP3 installed

Noel and Marie nandm at adam.com.au
Mon Jun 21 11:17:03 CEST 2010


Thank you Tomas for your suggestions and very quick response.

Regards,
  Noel
----- Original Message ----- 
From: "Tomas Hajny" <XHajT03 at hajny.biz>
To: "FPC-Pascal users discussions" <fpc-pascal at lists.freepascal.org>
Sent: Monday, June 21, 2010 6:27 PM
Subject: Re: [fpc-pascal] Different default ASCII tablein fpc IDE with SP3 
installed


On Mon, June 21, 2010 10:19, Noel and Marie wrote:


Hello,

> Recently SP3 for XP was installed on my PC.
>
> An fpc 2.2.0  program that previously displayed a square root symbol when
> instructed to write chr(251) now displays a superscript 1. In other words,
> the character set displayed in the IDE through Tools ->ascii table is
> different from the one previously displayed.
>
> Can you give instructions on how to have the program use the former
> character set please?

There are several options for you:

1) Change the console code page to the preferred character set before
starting the program (e.g. by calling 'cp 437' on the command line or from
a batch file before invoking your program). Advantage: No change to the
program is required. Disadvantage: Change necessary on each and every
machine where the program runs.

2) Change the console code page to the preferred character set using the
Win32 API from within the program. Advantage: No user changes necessary.
Disadvantage: Platform dependent change (if you aim to support multiple
platforms), no chance for the user to use a different character set (i.e.
no possibility of displaying characters used in other languages any
longer).

3) Start using widestrings / Unicode characters. Advantage: Your programs
becomes completely independent from the used character set and allows
reliable displaying of whichever characters you may need (as long as they
are supported by the installed fonts, of course). Disadvantage: Depending
on the way your program is currently written / output to console is
performed, major changes to your program may be necessary.

Hope this helps

Tomas


_______________________________________________
fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal




More information about the fpc-pascal mailing list