The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here

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

tennenrishintennenrishin Member Posts: 177 Contributor II
edited November 2018 in Help
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>

Answers

  • MariusHelfMariusHelf RapidMiner Certified Expert, Member Posts: 1,869 Unicorn
    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
  • aborgaborg Member Posts: 66 Contributor II
    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.)
  • tennenrishintennenrishin Member Posts: 177 Contributor II
    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.
Sign In or Register to comment.