Sign in Join

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

Mailing lists / fpc-devel / 2001-11

GRAPH Unit for linux - Problems

8 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

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

Andreas K. Foerster

Hello,

I came along with some problems with the GRAPH unit (1.0.4 / Linux):

- The command ClearViewPort doesn't set the Position to 0,0.
- Outtext doesn't handle international characters correctly
- And CloseGraph doesn't reset the Console correctly.

Tschuess Andreas

Reply by email

Jonas Maebe
to Andreas K. Foerster
Andreas K. Foerster wrote
- The command ClearViewPort doesn't set the Position to 0,0.

Fixed.

- Outtext doesn't handle international characters correctly

I'm not sure what the problem is here, I believe Sebastian Günther implemented some things for this.

- And CloseGraph doesn't reset the Console correctly.

This should be fixed already in the snapshots.

Jonas

Reply by email

Sebastian Günther
to Jonas Maebe
Jonas Maebe wrote 5 lines
> - Outtext doesn't handle international characters correctly I'm not sure what the problem is here, I believe Sebastian Günther implemented some things for this.

Yes. The old Borland fonts use codepage 437, while Linux uses ISO8859-1 (a.k.a. ANSI charset) as default charset. So when you try to print Umlaute etc. which display correctly in the source on Linux, you will get wrong results.

Some time ago I've added the possibility to specify a translation table. This table is a variable called GraphStringTransTable, and a translation table for ISO8859-1 to CP437 is already included in the graph unit. To enable this translation, just add this line to the initialization code of the application:

GraphStringTransTable := @AnsiToASCIITransTable;

- Sebastian

Reply by email

Andreas K. Foerster
to Andreas K. Foerster: I came along with some problems with the GRAPH unit (1.0.4 / Linux): - The command…
I came along with some problems with the GRAPH unit (1.0.4 / Linux): - The command ClearViewPort doesn't set the Position to 0,0.

Okay, I set it myself. :-\

- Outtext doesn't handle international characters correctly

Now I found that there is already a translation table, which just has to be activated by:

GraphStringTransTable := @AnsiToASCIITransTable;

You really should put that into the manual!

BTW. the naming is not correct, because /both/ charsets are based on ASCII and it's not translated to /pure/ ASCII.

- And CloseGraph doesn't reset the Console correctly.

That's still a problem.

Another fault in the docs: the functions "InstallUserDriver" and "RegisterBGIDriver" are explained as if they were implemented.

Tschuess Andreas

Reply by email

Sebastian Günther
to Andreas K. Foerster
"Andreas K. Foerster" wrote 7 lines
GraphStringTransTable := @AnsiToASCIITransTable; You really should put that into the manual! BTW. the naming is not correct, because /both/ charsets are based on ASCII and it's not translated to /pure/ ASCII.

I know, but in the usual speech Ansi is the Windows/Linux charset (ISO8859-1, more or less), and ASCII the old DOS charset. Microsoft would name this "AnsiToOEMTransTable". Correct would be "ISO8859_1ToCP437TransTable". Not very nice names either.

- Sebastian

Reply by email

Andreas K. Foerster
to Sebastian Günther
Sebastian Günther wrote 11 lines
> GraphStringTransTable := @AnsiToASCIITransTable; > > You really should put that into the manual! > > BTW. the naming is not correct, because /both/ charsets are based on > ASCII and it's not translated to /pure/ ASCII. I know, but in the usual speech Ansi is the Windows/Linux charset (ISO8859-1, more or less), and ASCII the old DOS charset. Microsoft would name this "AnsiToOEMTransTable". Correct would be "ISO8859_1ToCP437TransTable". Not very nice names either.

It's also called IBM charset.
So why not "AnsiToIBMTransTable"?

Tschuess Andreas

Reply by email

Sebastian Günther
to Andreas K. Foerster
"Andreas K. Foerster" wrote
It's also called IBM charset. So why not "AnsiToIBMTransTable"?

or, AnsiToDOSTransTable...
There are countless possibilities. What are the opinions of other core members about this issue?

- Sebastian

Reply by email

Unknown author
to Sebastian Günther

Date sent: Tue, 20 Nov 2001 10:55:47 +0100
From: Sebastian Günther
To:
Subject: Re: [fpc-devel]Re: GRAPH Unit for linux - Problems Send reply to:

Show quoted text 6 lines
> It's also called IBM charset. > So why not "AnsiToIBMTransTable"? or, AnsiToDOSTransTable... There are countless possibilities. What are the opinions of other core members about this issue?

I don't mind very much myself, except that I find my OS/2 "somewhat" ;-) different from DOS, although it uses absolutely the same default codepages (e.g. CP 852 here, and CP 850 for western Europe), so I don't think AnsiToDos* would be very accurate. ;-)

Tomas

Reply by email