<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi there<br>
    <br>
    When I execute a script, I save info to a file, which I then load
    into SciNotes. This unfortunately dis-colors the text ... also in
    the script that executed - and in other scripts loaded into
    SciNotes. Black text becomes red for some odd reason.<br>
    <br>
    Here's some sample code that replicates the error ... at least in my
    version of Scilab 5.5.0 it shows the bug:<br>
    <br>
    <span style="color:rgb(100,174,100);font-style:italic;">// test.sce</span><br>
    <span style="color:rgb(100,174,100);font-style:italic;">//</span><br>
    <span style="color:rgb(100,174,100);font-style:italic;">// Purpose -
      to demonstrate software bug in SciNotes.</span><br>
    <span style="color:rgb(100,174,100);font-style:italic;">//</span><br>
    <span style="color:rgb(100,174,100);font-style:italic;">// When
      executed, the result is saved to a txt file, which is loaded into</span><br>
    <span style="color:rgb(100,174,100);font-style:italic;">// SciNotes
      for viewing ... but then the color coding is bad in SciNotes and</span><br>
    <span style="color:rgb(100,174,100);font-style:italic;">// even this
      test.sce script - much of the text that should be black is red!</span><br>
    <br>
    <span style="color:rgb(50,185,185);">clear</span><span
      style="color:rgb(0,0,0);">;</span> <span
      style="color:rgb(100,174,100);font-style:italic;">// Clear
      variables</span><br>
    <span style="color:rgb(50,185,185);">xdel</span><span
      style="color:rgb(74,85,219);">(</span><span
      style="color:rgb(50,185,185);">winsid</span><span
      style="color:rgb(74,85,219);">(</span><span
      style="color:rgb(74,85,219);">)</span><span
      style="color:rgb(74,85,219);">)</span><span
      style="color:rgb(0,0,0);">; </span><span
      style="color:rgb(100,174,100);font-style:italic;">// Clear
      graphics</span><br>
    <span style="color:rgb(50,185,185);">clc</span><span
      style="color:rgb(0,0,0);">;</span> <span
      style="color:rgb(100,174,100);font-style:italic;">// Clear console</span><br>
    <span style="color:rgb(0,0,0);">scriptpath</span> <span
      style="color:rgb(92,92,92);">=</span> <span
      style="color:rgb(50,185,185);">get_absolute_file_path</span><span
      style="color:rgb(74,85,219);">(</span><span
      style="color:rgb(188,143,143);">"</span><span
      style="color:rgb(188,143,143);">test.sce</span><span
      style="color:rgb(188,143,143);">"</span><span
      style="color:rgb(74,85,219);">)</span><span
      style="color:rgb(0,0,0);">;</span><br>
    <span style="color:rgb(50,185,185);">chdir</span><span
      style="color:rgb(74,85,219);">(</span><span
      style="color:rgb(0,0,0);">scriptpath</span><span
      style="color:rgb(74,85,219);">)</span><span
      style="color:rgb(0,0,0);">;</span><br>
    <br>
    <span style="color:rgb(0,0,0);">outputfile</span> <span
      style="color:rgb(92,92,92);">=</span> <span
      style="color:rgb(218,112,214);">%t</span><span
      style="color:rgb(0,0,0);">;</span> <span
      style="color:rgb(100,174,100);font-style:italic;">// Print result
      (the parameters) to a textfile<br>
    </span><span style="color:rgb(0,0,0);">name</span> <span
      style="color:rgb(92,92,92);">=</span> <span
      style="color:rgb(188,143,143);">"</span><span
      style="color:rgb(188,143,143);">test</span><span
      style="color:rgb(188,143,143);">"</span><span
      style="color:rgb(0,0,0);">;</span> <span
      style="color:rgb(100,174,100);font-style:italic;">// Just the name
      of the script file<br>
      <br>
    </span><span style="color:rgb(160,32,240);">if</span> <span
      style="color:rgb(0,0,0);">outputfile</span> <span
      style="color:rgb(160,32,240);">then</span><br>
    <span style="color:rgb(0,0,0);">    outfile</span> <span
      style="color:rgb(92,92,92);">=</span> <span
      style="color:rgb(0,0,0);">scriptpath</span> <span
      style="color:rgb(92,92,92);">+</span> <span
      style="color:rgb(188,143,143);">"</span><span
      style="color:rgb(188,143,143);">\</span><span
      style="color:rgb(188,143,143);">"</span> <span
      style="color:rgb(92,92,92);">+</span> <span
      style="color:rgb(0,0,0);">name</span> <span
      style="color:rgb(92,92,92);">+</span> <span
      style="color:rgb(188,143,143);">"</span><span
      style="color:rgb(188,143,143);">_out.txt</span><span
      style="color:rgb(188,143,143);">"</span><span
      style="color:rgb(0,0,0);">;</span><br>
    <span style="color:rgb(0,0,0);">    fd</span> <span
      style="color:rgb(92,92,92);">=</span> <span
      style="color:rgb(50,185,185);">mopen</span><span
      style="color:rgb(74,85,219);">(</span><span
      style="color:rgb(0,0,0);">outfile</span><span
      style="color:rgb(0,0,0);">,</span><span
      style="color:rgb(188,143,143);">'</span><span
      style="color:rgb(188,143,143);">wt</span><span
      style="color:rgb(188,143,143);">'</span><span
      style="color:rgb(74,85,219);">)</span><span
      style="color:rgb(0,0,0);">;</span><br>
    <span style="color:rgb(50,185,185);">    mfprintf</span><span
      style="color:rgb(74,85,219);">(</span><span
      style="color:rgb(0,0,0);">fd</span><span style="color:rgb(0,0,0);">,</span><span
      style="color:rgb(188,143,143);">"</span><span
      style="color:rgb(188,143,143);">Project name: %s\n</span><span
      style="color:rgb(188,143,143);">"</span><span
      style="color:rgb(0,0,0);">,</span><span style="color:rgb(0,0,0);">name</span><span
      style="color:rgb(74,85,219);">)</span><span
      style="color:rgb(0,0,0);">;</span> <span
      style="color:rgb(100,174,100);font-style:italic;">// print some
      header information</span><br>
    <span style="color:rgb(50,185,185);">    mclose</span><span
      style="color:rgb(74,85,219);">(</span><span
      style="color:rgb(0,0,0);">fd</span><span
      style="color:rgb(74,85,219);">)</span><span
      style="color:rgb(0,0,0);">;</span><br>
    <span style="color:rgb(160,32,240);">    if</span> <span
      style="color:rgb(74,85,219);">(</span><span
      style="color:rgb(50,185,185);">isdef</span><span
      style="color:rgb(74,85,219);">(</span><span
      style="color:rgb(188,143,143);">'</span><span
      style="color:rgb(188,143,143);">editor</span><span
      style="color:rgb(188,143,143);">'</span><span
      style="color:rgb(74,85,219);">)</span> <span
      style="color:rgb(92,92,92);">|</span> <span
      style="color:rgb(74,85,219);">(</span><span
      style="color:rgb(50,185,185);">funptr</span><span
      style="color:rgb(74,85,219);">(</span><span
      style="color:rgb(188,143,143);">'</span><span
      style="color:rgb(188,143,143);">editor</span><span
      style="color:rgb(188,143,143);">'</span><span
      style="color:rgb(74,85,219);">)</span><span
      style="color:rgb(92,92,92);"><></span><span
      style="color:rgb(188,143,143);">0</span><span
      style="color:rgb(74,85,219);">)</span><span
      style="color:rgb(74,85,219);">)</span> <span
      style="color:rgb(160,32,240);">then</span><br>
            <span
      style="color:rgb(174,92,176);text-decoration:underline;">editor</span><span
      style="color:rgb(74,85,219);">(</span><span
      style="color:rgb(0,0,0);">outfile</span><span
      style="color:rgb(74,85,219);">)</span><span
      style="color:rgb(0,0,0);">;</span><br>
        <span style="color:rgb(160,32,240);">end</span><br>
    <span style="color:rgb(160,32,240);">end</span><br>
    <br>
    Can you replicate this? Does this also create dis-coloration in
    SciNotes in your version of Scilab? If you load another (e.g. sce or
    sci, but in theory any) file - is text also dis-colored in these
    files?<br>
    <br>
    BTW, as a rather strange observation - I copied the dis-colored text
    into this email - but as you can see, no red text. Even if colors
    are copied, it doesn't copy the dis-coloration. It might give the
    developer a clue what's going on ...<br>
    <br>
    Best regards,<br>
    Claus<br>
  </body>
</html>