<div dir="ltr">Good idea, or just ^Unicode.<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/10/1 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 01-10-2013, at 2:19 PM, Nicolas Cellier &lt;<a href="mailto:nicolas.cellier.aka.nice@gmail.com">nicolas.cellier.aka.nice@gmail.com</a>&gt; wrote:<br>
<br>
&gt; (1 to: 30) collect: [:i | EncodedCharSet charsetAt: i]<br>
<br>
</div>Well that is interesting. The code uses at:ifAbsent:, clearly intending to prevent a nil result - and as I mentioned all but two senders rely on a &#39;proper&#39; answer. Oh, here we are - SequenceableCollection&gt;at:ifAbsent: *only* treats outside the 1..size range as absent, not a nil. I&#39;m thinking the original code was predicated on a Dictionary and then the collection was changed to an Array.<br>

<br>
So I&#39;d suggest<br>
charsetAt: encoding<br>
<br>
        ^ (EncodedCharSets at: encoding + 1) ifNil: [EncodedCharSets at: 1].<br>
… assuming we prefer<br>
<div class="im"><br>
(1 to: 30) collect: [:i | EncodedCharSet charsetAt: i]<br>
</div>--&gt; {JISX0208 . GB2312 . KSX1001 . JISX0208 . JapaneseEnvironment . SimplifiedChineseEnvironment . KoreanEnvironment . GB2312 . Unicode . Unicode . Unicode . KSX1001 . Unicode . Unicode . Unicode . Unicode . Unicode . Unicode . Unicode . Unicode . Unicode . Unicode . Unicode . Unicode . Unicode . Unicode . Unicode . Unicode . Unicode . Unicode}<br>

<br>
At least it isn&#39;t {Developers. Developers. Developers. Developers. Developers. Developers. Developers. } ;-)<br>
<div class="im"><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>
</div>Implementation is the sincerest form of flattery.<br>
<br>
<br>
<br>
</blockquote></div><br></div>