write function and writeLn print cryptic characters into the console lazarus / 9-Editor ---------------------------------------------------------------------- dankmarius · 2018-08-20 17:50 So when ever I print something to the console the first line (and only the first) starts with some cryptic characters and I don't know how to fix the issue. I am on Ubuntu and installed the latest lazarus-ide version (1.8.4). The issue only surfaces when I use the CRT package, if it isn't included no problems arise. What can I do to solve this problem? ---------------------------------------------------------------------- Handoko · 2018-08-20 18:18 Hello dankmarius, Welcome to the forum. The binary created using Lazarus/FPC works perfectly. Just don't run it using Lazarus Terminal Output (Ctrl+Alt+O), you should run it using the Terminal provided by your Ubuntu. ---------------------------------------------------------------------- engkin · 2018-08-20 20:19 Just curious, what was the correct text in the first line? ---------------------------------------------------------------------- Handoko · 2018-08-21 01:25 Below is the code and the console output using Lazarus Terminal Output. The bug already existed since first time I used Lazarus on Ubuntu. But because I think it wasn't critical and I do not write console program, I just ignore it. The result binaries will show correctly if I run them using the Terminal provided by Ubuntu. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i program Project1; uses  Crt; begin  WriteLn('Hello');  WriteLn('World.');  ReadLn;end. ---------------------------------------------------------------------- engkin · 2018-08-21 02:53 Thank you! Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i //Laz\fpc\3.0.4\source\packages\rtl- console\src\unix\crt.ppInitialization...   { Get current X,Y if not set already }     GetXY(CurrX,CurrY);     if (CurrX=0) then      begin        CurrX:=1;        CurrY:=1;        ttySendStr(#27'[H');    end;   {Reset Attribute (TextAttr=7 at startup)}      ttySendStr(#27'[m');.. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i //Laz\fpc\3.0.4\source\packages\rtl-console\src\unix\crt.ppprocedure GetXY(var x,y:byte);...  s:=#27'[6n';  fpWrite(0,s[1],length(s));.. Edit: ESC 0 J: clear from cursor to end of the screen. ESC 1 J: clear from cursor to beginning of the screen. ESC 2 J: clear entire screen. Source. ---------------------------------------------------------------------- dankmarius · 2018-08-21 07:09 Thank you very much Handoko, this fiexd my issue.