<div dir="ltr"><div><div>I don&#39;t think it would be sane to rely on this.<br></div>But even if we&#39;d really want this feature, then it is broken by virtue of nextChunkPut: which does honour the lineEndConvention... So we have to change one or the other.<br>
<br></div>The main drawback of not forcing cr is that it makes it hard to compare code thru changeList (for example recent Cuis is using LF). I can implement other workarounds though.<br></div><div class="gmail_extra"><br>
<br><div class="gmail_quote">2013/11/1 Levente Uzonyi <span dir="ltr">&lt;<a href="mailto:leves@elte.hu" target="_blank">leves@elte.hu</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I think it&#39;s intentional. The content of the chunks shouldn&#39;t be changed while being read. Let&#39;s say I implement #isCr: as<br>
<br>
isCr: aCharacter<br>
<br>
        ^$<br>
        == aCharacter<br>
<br>
By default it will return true if the argument foo is a carriage return character, otherwise false. But if we allow changing the line endings in chunks, then its behavior might be different after loading.<span class="HOEnZb"><font color="#888888"><br>

<br>
<br>
Levente</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
On Thu, 31 Oct 2013, <a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Nicolas Cellier uploaded a new version of MultilingualTests to project The Trunk:<br>
<a href="http://source.squeak.org/trunk/MultilingualTests-nice.17.mcz" target="_blank">http://source.squeak.org/<u></u>trunk/MultilingualTests-nice.<u></u>17.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: MultilingualTests-nice.17<br>
Author: nice<br>
Time: 31 October 2013, 11:54:33.464 pm<br>
UUID: 6de55950-5fff-43d1-9ce0-<u></u>8b661515f618<br>
Ancestors: MultilingualTests-tpr.16<br>
<br>
Add a test showing that MultiByteFileStream&gt;&gt;nextChunk fails to honour its own lineEndConvention.<br>
<br>
=============== Diff against MultilingualTests-tpr.16 ===============<br>
<br>
Item was added:<br>
+ ----- Method: MultiByteFileStreamTest&gt;&gt;<u></u>testLineEndingChunk (in category &#39;testing&#39;) -----<br>
+ testLineEndingChunk<br>
+<br>
+       fileName := &#39;foolinend.txt&#39;.<br>
+       MultiByteFileStream forceNewFileNamed: fileName do: [ :file |<br>
+               file<br>
+                       wantsLineEndConversion: false;<br>
+                       nextPutAll: &#39;line 1&#39;; cr;<br>
+                       nextPutAll: &#39;line 2&#39;; crlf;<br>
+                       nextPutAll: &#39;line 3&#39;; lf;<br>
+                       nextPutAll: &#39;line 4&#39;; nextPut: $!! ].<br>
+       {<br>
+               {#cr.  &#39;line 1&#39; , String cr , &#39;line 2&#39; , String cr , &#39;line 3&#39; , String cr , &#39;line 4&#39;}.<br>
+               {#lf.  &#39;line 1&#39; , String cr , &#39;line 2&#39; , String cr , &#39;line 3&#39; , String cr , &#39;line 4&#39;}.<br>
+               {#crlf.  &#39;line 1&#39; , String cr , &#39;line 2&#39; , String cr , &#39;line 3&#39; , String cr , &#39;line 4&#39;}.<br>
+               {nil.  &#39;line 1&#39; , String cr , &#39;line 2&#39; , String crlf , &#39;line 3&#39; , String lf , &#39;line 4&#39;}<br>
+       } do: [:lineEndingResult |<br>
+               MultiByteFileStream oldFileNamed: fileName do: [ :file |<br>
+                       file lineEndConvention: lineEndingResult first.<br>
+                       self assert: lineEndingResult last equals: file nextChunk ] ]!<br>
<br>
<br>
<br>
</blockquote>
<br>
</div></div></blockquote></div><br></div>