[SOLVED] Write Message with newlines that work for ms notepad

tennenrishin
tennenrishin New Altair Community Member
edited November 5 in Community Q&A
How can I get the Write Message operator to put newlines in the file, in a way that could be understood by Microsoft Notepad.
Is there a certain encoding I should use?
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="5.3.005">
 <context>
   <input/>
   <output/>
   <macros/>
 </context>
 <operator activated="true" class="process" compatibility="5.3.005" expanded="true" name="Process">
   <process expanded="true">
     <operator activated="true" class="write_message" compatibility="5.3.005" expanded="true" height="60" name="Write Message" width="90" x="179" y="75">
       <parameter key="file" value="C:\Users\isak\Desktop\a.txt"/>
       <parameter key="text" value="the&#10;quick&#10;brown&#10;fox"/>
     </operator>
     <portSpacing port="source_input 1" spacing="0"/>
     <portSpacing port="sink_result 1" spacing="0"/>
   </process>
 </operator>
</process>
Tagged:

Answers

  • MariusHelf
    MariusHelf New Altair Community Member
    Hi,

    that's currently not possible. As a workaround I can suggest you Notepad++, a third-party text editor which is also lightweight, but way more powerful than MS notepad.
    Anyway, I have created an internal ticket.

    Best regards,
    Marius
  • aborg
    aborg New Altair Community Member
    As a workaround you can replace the &#10; parts in the text part in the xml with &#13;&#10; and apply the changes. (Maybe macros would also work, I am not sure.)
  • tennenrishin
    tennenrishin New Altair Community Member
    That works, and it even retains the carriage returns when the text is edited in the GUI editor!

    Just one thing to be careful about when appending to lines in the editor: Be sure to position the insertion point before the carriage return character, not after. Even though these look like the same place, they are separated by an invisible character that can be traversed using arrow keys. Otherwise the carriage return can become separated from the line feed.