Forum > FV/Textmode IDE
ANSI and ASCII Editor file in pascal(or py)?
(1/1)
d-_-b:
Hi
I wonder if there is any terminal wizard lurking on the forums? I have a artist using moebius ansi editor to create the picture you see on the left.
But if i use the below pascal or attache python code in the pic my result is what you see on the right.
What am i doing wrong? I'm using mobaxterm on win10 and stuff like cmatrix and pipes.sh renders correctly.
So how must i change my pascal code to get the ansi like output of moebius?
The medtricorder.ans file can be found here
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---program ansview; {$mode objfpc}{$H+} uses Process, SysUtils, Classes;var s: ansistring = ''; strs: TStringList;begin strs := TStringList.Create; try strs.LoadFromFile('data/medtricorder.ans'); writeln(strs.text); //if RunCommand('/bin/bash', ['-c', format('echo %s', [strs.text] ) ], s) then writeln(s) finally strs.free; end;end.
trev:
Character set/codepage issue? See here which may be of help.
Navigation
[0] Message Index