On 05.02.2010 20:01, Yanni Chiu wrote:
> Henrik Sperre Johansen wrote:
>    
>>>             i<= 128 ifTrue:[
>>>                     NonAsciiMap at: i put: 0. "valid ascii subset"
>>>             ] ifFalse:[
>>>                     NonAsciiMap at: i put: 1. "extended charset"
>>>     
>>>             ].
>>>     ].
>>>
>>> Notice the "i<= 128" vs. "i<   128". That fixes it, but now the concept
>>> of NonAsciiMap is wrong. I'm not sure what the final fix should be.
>>>
>>>
>>>        
>> No, that's me making an off-by-one error :S
>> The i<= 128 is correct.
>>      
> Then the comments are misleading, because 128 is in the extended charset.
>
>    
Yes, but arrays in smalltalk start on index 1 instead of 0. So the map 
has char 0 at index 1, and char 127 at index 128.

Cheers,
Henry

_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to