<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div>Or are you using different editors? Different editors might use different conventions for representing newlines. </div><div><br></div><div>When the 32 bit one has the problem, what does it say? </div><div><br></div><div>For example when I made the text file with DrRacket or TextEdit but ran it with racket (not DrRacket), it worked, </div><div>but when I made the text file with Microsoft Word, it gave me this:</div><div><span style="font-family: Monaco; font-size: 10px;">$ racket newline-3.txt</span></div><div><div style="margin: 0px; font-size: 10px; font-family: Monaco;">(format "~n") = "\n"</div><div style="margin: 0px; font-size: 10px; font-family: Monaco;">"</div><div style="margin: 0px; font-size: 10px; font-family: Monaco;">" = "\r"</div><div style="margin: 0px; font-size: 10px; font-family: Monaco;">Ran 1 check.</div><div style="margin: 0px; font-size: 10px; font-family: Monaco;">0 checks passed.</div><div style="margin: 0px; font-size: 10px; font-family: Monaco;"><span class="Apple-tab-span" style="white-space:pre"> </span>Actual value </div><div style="margin: 0px; font-size: 10px; font-family: Monaco;">, the expected value.</div><div style="margin: 0px; font-size: 10px; font-family: Monaco;"> In newline-3.txt at line 7 column 0</div></div><br><div><div>On Jun 20, 2014, at 5:14 PM, Jos Koot <<a href="mailto:jos.koot@gmail.com">jos.koot@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Very strange.<br>I did the same on my other computer and there it has the same problem as<br>before.<br>I use windows 7 on both systems one with 64 bit OS and one with 32 bit OS.<br>The 64 bit version does well, the 32 bit windows 7 system has the problem.<br>May be my preferences? <br>Thanks, Jos<br><br><blockquote type="cite">-----Original Message-----<br>From: Jos Koot [<a href="mailto:jos.koot@gmail.com">mailto:jos.koot@gmail.com</a>] <br>Sent: viernes, 20 de junio de 2014 23:03<br>To: 'Alexander D. Knauth'<br>Cc: 'users'; 'Jos Koot'<br>Subject: RE: [racket] newlines in strings not the same in <br>DrRacket and Racket<br><br>Gives me<br><br>(format "~n") = "\n"<br>"<br>" = "\n"<br>The only test passed!<br><br>both in DrRacket and Racket.<br>Very surprising. Can you explain what happens here?<br>I don't have a clue.<br>Thanks,<br>Jos<br><br><br>________________________________<br><br><span class="Apple-tab-span" style="white-space:pre"> </span>From: Alexander D. Knauth [<a href="mailto:alexander@knauth.org">mailto:alexander@knauth.org</a>] <br><span class="Apple-tab-span" style="white-space:pre"> </span>Sent: viernes, 20 de junio de 2014 22:41<br><span class="Apple-tab-span" style="white-space:pre"> </span>To: Jos Koot<br><span class="Apple-tab-span" style="white-space:pre"> </span>Cc: users<br><span class="Apple-tab-span" style="white-space:pre"> </span>Subject: Re: [racket] newlines in strings not the same <br>in DrRacket and Racket<br><span class="Apple-tab-span" style="white-space:pre"> </span><br><span class="Apple-tab-span" style="white-space:pre"> </span><br><span class="Apple-tab-span" style="white-space:pre"> </span>This doesn't exactly solve your problem, but what <br>happens (for both cases) when you do this?:<br><span class="Apple-tab-span" style="white-space:pre"> </span>#lang racket<br><span class="Apple-tab-span" style="white-space:pre"> </span>(require test-engine/racket-tests)<br><span class="Apple-tab-span" style="white-space:pre"> </span>(display "(format \"~n\") = ") (format "~n")<br><span class="Apple-tab-span" style="white-space:pre"> </span>(display "\"") (newline)<br><span class="Apple-tab-span" style="white-space:pre"> </span>(display "\" = ") "<br><span class="Apple-tab-span" style="white-space:pre"> </span>"<br><span class="Apple-tab-span" style="white-space:pre"> </span>(check-expect (format "~n") "<br><span class="Apple-tab-span" style="white-space:pre"> </span>")<br><span class="Apple-tab-span" style="white-space:pre"> </span>(test)<br><span class="Apple-tab-span" style="white-space:pre"> </span>(void (read-line)) ; wait until the user has read the results.<br><br><span class="Apple-tab-span" style="white-space:pre"> </span>On Jun 20, 2014, at 3:02 PM, Jos Koot <br><<a href="mailto:jos.koot@gmail.com">jos.koot@gmail.com</a>> wrote:<br><br><br><span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre"> </span>Running the following in DrRacket goes well.<br><span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre"> </span><br><span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre"> </span>#lang racket<br><span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre"> </span>(require test-engine/racket-tests)<br><span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre"> </span>(check-expect (format "~n") "<br><span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre"> </span>")<br><span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre"> </span>(test)<br><span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre"> </span>(read-line) ; wait until the user has read the results.<br><span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre"> </span><br><span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre"> </span>Displays: The only test passed!<br><span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre"> </span><br><span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre"> </span>But running the same with Racket tells me the <br>test fails.<br><span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre"> </span>I have a solution for this by removing #\return <br>from the strings to be<br><span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre"> </span>compared.<br><span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre"> </span><br><span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre"> </span>Question though: Can I solve this problem in a <br>simpler way?<br><span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre"> </span>May be I overlooked something in the docs?<br><span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre"> </span><br><span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre"> </span>Best wishes, Jos<br><span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre"> </span><br><span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre"> </span><br><span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre"> </span>____________________<br><span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre"> </span> Racket Users list:<br><span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre"> </span> <a href="http://lists.racket-lang.org/users">http://lists.racket-lang.org/users</a><br><span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre"> </span><br><br><br><br></blockquote><br></blockquote></div><br></body></html>