[squeak-dev] The Trunk: Multilingual-tpr.185.mcz
Levente Uzonyi
leves at elte.hu
Tue Oct 8 22:52:12 UTC 2013
On Tue, 8 Oct 2013, Nicolas Cellier wrote:
> I would prefer decent default being ^Unicode, if ever (EncodedCharSets at:1) isNil for some (bad) reason.
Wouldn't it be better to fill the EncodedCharSets array with Unicode
by default in EncodedCharSet class >> #initialize? (replace the line
EncodedCharSets := Array new: 256.
with:
EncodedCharSets := Array new: 256 withAll: Unicode
)
That way #charsetAt: could be simply
^EncodedCharSets at: encoding + 1
Levente
>
>
> 2013/10/8 <commits at source.squeak.org>
> tim Rowledge uploaded a new version of Multilingual to project The Trunk:
> http://source.squeak.org/trunk/Multilingual-tpr.185.mcz
>
> ==================== Summary ====================
>
> Name: Multilingual-tpr.185
> Author: tpr
> Time: 8 October 2013, 2:50:18.117 pm
> UUID: 4417f293-d927-4f27-a55e-140178ab2eee
> Ancestors: Multilingual-nice.184
>
> Make the character encoders and language environments understand how to delgate the next step of character scanning
>
> =============== Diff against Multilingual-nice.184 ===============
>
> Item was changed:
> ----- Method: EncodedCharSet class>>charsetAt: (in category 'class methods') -----
> charsetAt: encoding
> + "Find the char set encoding that matches 'encoding'; return a decent default rather than nil"
> + ^ (EncodedCharSets at: encoding + 1) ifNil: [EncodedCharSets at: 1].
> -
> - ^ EncodedCharSets at: encoding + 1 ifAbsent: [EncodedCharSets at: 1].
> !
>
> Item was added:
> + ----- Method: EncodedCharSet class>>scanMultibyteCharactersFrom:to:in:with:rightX:font: (in category 'accessing - displaying') -----
> + scanMultibyteCharactersFrom: startIndex to: stopIndex in: aWideString with: aCharacterScanner rightX: rightX font: aFont
> + "the default for scanning multibyte characters- other more specific encodings may do something else"
> + ^aFont scanMultibyteCharactersFrom: startIndex to: stopIndex in: aWideString with: aCharacterScanner rightX: rightX!
>
> Item was added:
> + ----- Method: JapaneseEnvironment class>>scanMultibyteCharactersFrom:to:in:with:rightX:font: (in category 'language methods') -----
> + scanMultibyteCharactersFrom: startIndex to: stopIndex in: aWideString with: aCharacterScanner rightX: rightX font: aFont
> + "scanning multibyte Japanese strings"
> + ^aFont scanMultibyteJapaneseCharactersFrom: startIndex to: stopIndex in: aWideString with: aCharacterScanner rightX: rightX!
>
> Item was added:
> + ----- Method: LanguageEnvironment class>>scanMultibyteCharactersFrom:to:in:with:rightX:font: (in category 'language methods') -----
> + scanMultibyteCharactersFrom: startIndex to: stopIndex in: aWideString with: aCharacterScanner rightX: rightX font: aFont
> + "the default for scanning multibyte characters- other more specific encodings may do something else"
> + ^aFont scanMultibyteCharactersFrom: startIndex to: stopIndex in: aWideString with: aCharacterScanner rightX: rightX!
>
> Item was added:
> + ----- Method: String>>encodedCharSetAt: (in category '*Multilingual') -----
> + encodedCharSetAt: index
> + "return the character encoding in place at index; the actual EncodedCharSet, not just a number. A bad index is an Error"
> + ^EncodedCharSet charsetAt: (self at: index) leadingChar!
>
>
>
>
>
More information about the Squeak-dev
mailing list
|