Other Printing ASCII characters using FPC

bsaidus

Active Member

Reaction score: 3
Messages: 102

Hello;
I use Freepascal 3.2.2 for FreeBSD 12.2.
I write a simple program to show menu in console, this menu is in windows witch is drawed using special characters,
In windows it works ( even on FreeBSD7 & 8 it worked ) but in these late version ( v10, v11, v12 ) it do not works.
here is a simple program:
Python:
procedure TUCShell.LRedrawInputWindow;
var
  i: Integer;
begin
  //GotoXY(4,  17); WriteLn(UConsol9);
  GotoXY(Length(CChoice) + 5, 18 ); ClrEol;
  GotoXY(4,  18); Write(Char(186)); Write(CChoice);
  GotoXY(72, 18); Write(Char(186));
  GotoXY(4,  19); Write(Char(200));
  for i := 5 to 71 do
    Write(Char(205));
  GotoXY(72, 17); Write(Char(185));
  GotoXY(72, 19); Write(Char(188));
  //
  GotoXY(4,  20); WriteLn( hostname + fGethostname() ) ;
  // Goto to DO _:
  GotoXY(Length(CChoice) + 5, 18);
end;

The window drowen using printing special characters do not work
 

Attachments

  • freebsd12.jpg
    freebsd12.jpg
    6.4 KB · Views: 20
  • windows.jpg
    windows.jpg
    6.3 KB · Views: 23

covacat

Aspiring Daemon

Reaction score: 325
Messages: 663

tput as;awk 'BEGIN { for(i=96;i<128;i++) printf("%03d %c\n",i,i);}';tput ae
this will show single line box characters codes as used by dialog
after you switch the character set with tput as you can use those
when you are done use tput ae
 

mark_j

Daemon

Reaction score: 745
Messages: 1,284

It looks like an issue with the terminal type? Terminfo capabilities? Is this running a ncurses-type library?
 
OP
bsaidus

bsaidus

Active Member

Reaction score: 3
Messages: 102

Not working. :'‑(
 

Attachments

  • freebsd12.jpg
    freebsd12.jpg
    6.2 KB · Views: 15

covacat

Aspiring Daemon

Reaction score: 325
Messages: 663

while you have the alternate charset enabled you can't print lowercase
so you have to print the graphic chars and then the text (or viceversa) or switch mode everytime you print something
 
OP
bsaidus

bsaidus

Active Member

Reaction score: 3
Messages: 102

It works .;)

Is there anyway to display double line characters .
thanks for help.
 

Attachments

  • freebsd12.jpg
    freebsd12.jpg
    5.9 KB · Views: 16
Top