title: How to change java freemarker newline character from LF to CRLF?
body: <p>Is there a way to instruct freemarker to use(force) CrLf instead of the LF character?</p>
  
  <p>Running on Windows 10, Using </p>
  
  <ul>
  <li>Java 1.8 </li>
  <li>freemarker.jar version 2.3.20 </li>
  <li>Jython 2.5.3 script to setup variables and execute the template engine</li>
  </ul>
  
  <p>I tried injecting a newline with <code>${'\n'}</code> and <code>${'\r\n'}</code> as suggested by this <a href="https://stackoverflow.com/questions/16108107/replace-new-line-character-in-freemarker">StackOverflow-post</a> But it doesn't have any effect. The problem is that the JVM/freemarker runtime always prints LF, as if it replaces it itself.  </p>
  
  <p>But i need the \n to be as the platform, thus a CrLf since i'm on a Windows system. I assume there's some freemarker setting to force it, but i can't find it..</p>
  
  <p>For the moment, i'm replacing the \n for \r\n in Jython when the freemarker-engine provides a chuck of output to the callback routine. </p>
  
  <p>But that replacing negatively impacts other parts of software; 1) it results in all strings to be replaced which is resource intensive 2) some files come out differently than before which is not desired.</p>
  
  <p>( i'm asking this again, because my previous post was marked duplicated with something which wasn't my problem. So i hope i stated my question more precisely this time. )</p>