<div dir="ltr">So, this (before the change) is one of the failing tests today in trunk.  With this change (which follows the lead of another test in this class), we can see that reading chunks with lineEndConvention set is completely ignored - in all cases, it returns the raw data unchanged.<div>
<br></div><div>Should the text be changed when reading in chunk data?  The method #nextChunk calls UTF8TextConverter #nextChunkFromStream:, which calls MultiByteFileStream #basicUpTo:, which does a raw upTo: on the stream.  In other words, it explicitly ignores any conversion.</div>
<div><br></div><div>Which path is correct, please?</div><div><br></div><div>Also, could $! existing inside of an encoded UTF8 character?  It is looking for raw bytes int eh stream that match change character; I&#39;m not familiar enough with UTF8 to know if that it is possible that a second (or third) byte in a UTF8 character could match it, and hence doing a #basicUpTo: would most definitely be wrong.</div>
<div><br></div><div>-cbc</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Aug 16, 2014 at 6:00 PM,  <span dir="ltr">&lt;<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">A new version of MultilingualTests was added to project The Inbox:<br>
<a href="http://source.squeak.org/inbox/MultilingualTests-cbc.19.mcz" target="_blank">http://source.squeak.org/inbox/MultilingualTests-cbc.19.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: MultilingualTests-cbc.19<br>
Author: cbc<br>
Time: 16 August 2014, 6:00:20.609 pm<br>
UUID: b3ccb0dc-5adc-3a4f-b722-98deab3ae9be<br>
Ancestors: MultilingualTests-fbs.18<br>
<br>
MultiByteFileStream&gt;&gt;testLineEndingChunk is failing on Windows platforms (maybe others).  Tweaked test to show which of the 4 is failing.<br>
<br>
=============== Diff against MultilingualTests-fbs.18 ===============<br>
<br>
Item was changed:<br>
  ----- Method: MultiByteFileStreamTest&gt;&gt;testLineEndingChunk (in category &#39;testing&#39;) -----<br>
  testLineEndingChunk<br>
+       | failures |<br>
-<br>
        fileName := &#39;foolinend.txt&#39;.<br>
+       failures := OrderedCollection new.<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 | | actual |<br>
-               MultiByteFileStream oldFileNamed: fileName do: [ :file |<br>
                        file lineEndConvention: lineEndingResult first.<br>
+                       lineEndingResult last = (actual := file nextChunk) ifFalse: [<br>
+                               failures add: (lineEndingResult copyWith: actual).<br>
+                               ].<br>
+                       ] ].<br>
+       self assert: failures isEmpty!<br>
-                       self assert: lineEndingResult last equals: file nextChunk ] ]!<br>
<br>
<br>
</blockquote></div><br></div>