<div dir="ltr"><div><div>If the encoding changes, then we never reach  (self isBreakableAt: lastIndex in: sourceString in: charset) because we ^#endOfRun.<br></div>Else, the encoding does not change, so we can proceed with charsetAt: startEncoding.<br>
</div>So, as I see it, the charsetAt: can safely go outside the loop, no?<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/10/10 tim Rowledge <span dir="ltr">&lt;<a href="mailto:tim@rowledge.org" target="_blank">tim@rowledge.org</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im"><br>
On 09-10-2013, at 11:33 PM, <a href="mailto:commits@source.squeak.org">commits@source.squeak.org</a> wrote:<br>
<br>
&gt; Nicolas Cellier uploaded a new version of Multilingual to project The Trunk:<br>
&gt; <a href="http://source.squeak.org/trunk/Multilingual-nice.189.mcz" target="_blank">http://source.squeak.org/trunk/Multilingual-nice.189.mcz</a><br>
&gt;<br>
&gt; ==================== Summary ====================<br>
&gt;<br>
&gt; Name: Multilingual-nice.189<br>
&gt; Author: nice<br>
&gt; Time: 10 October 2013, 1:33:16.023 am<br>
&gt; UUID: 2f31cb35-a0d0-41b4-be3e-f5c0bdb88e72<br>
&gt; Ancestors: Multilingual-nice.188<br>
&gt;<br>
&gt; Put the charsetAt: send out of the scanJapaneseCharactersFrom:to:in:rightX: inner loop.<br>
<br>
</div>I *think* that this is probably wrong; what if we have a wide string where a few characters are encoding 12 (middle earth Elvish), the next chunk is encoding &#39;pi&#39; (irrational political verbiage) and then some japanese, and then some other encoding? The checking of the encoding = startEncoding is how we work out that the encoding is changed and we need to exit to deal with that by reseting stuff. Isn&#39;t it?<br>

<br>
<br>
tim<br>
--<br>
tim Rowledge; <a href="mailto:tim@rowledge.org">tim@rowledge.org</a>; <a href="http://www.rowledge.org/tim" target="_blank">http://www.rowledge.org/tim</a><br>
Strange OpCodes: DO: Deadstart Operator<br>
<br>
<br>
<br>
</blockquote></div><br></div>