<div>Find another strange thing</div>
<div> </div>
<div>inspect "TextStyle defaultFont", in Squeak 3 (3.8,3.9,3.10), it was display as StrikeFontSet, but in Squeak 4, it was display as StrikeFont.</div>
<div> </div>
<div> </div>
<div>Also for the inputIntepreter, it work in 3.8, 3.9, but doesn't work in 3.10, any suggestion on how to debug such kind of method?</div>
<div> </div>
<div>For InputIntepreter<br><br>'From Squeak3.10.2 of ''5 June 2008'' [latest update: #7179] on 30 January 2011 at 4:58:28 pm'!<br>KeyboardInputInterpreter subclass: #WinGB2312InputInterpreter<br>
instanceVariableNames: 'converter'<br> classVariableNames: ''<br> poolDictionaries: ''<br> category: 'Multilingual-TextConversion'!</div>
<div>!WinGB2312InputInterpreter methodsFor: 'all' stamp: '1 1/30/2011 16:55'!<br>initialize</div>
<div> converter := CNGBTextConverter new.<br>! !</div>
<div>!WinGB2312InputInterpreter methodsFor: 'all' stamp: 'yo 6/20/2006 11:11'!<br>nextCharFrom: sensor firstEvt: evtBuf</div>
<div> | firstCharacter secondCharacter peekEvent char1Value keyValue pressType type stream multiCharacter |<br> keyValue := evtBuf third.<br> pressType := evtBuf fourth.<br> pressType = EventKeyDown ifTrue: [type := #keyDown].<br>
pressType = EventKeyUp ifTrue: [type := #keyUp].<br> pressType = EventKeyChar ifTrue: [type := #keystroke].</div>
<div> char1Value := (Character value: keyValue) macToSqueak asciiValue.<br> (char1Value > 16rA0 and: [char1Value < 16rF8]) ifFalse: [<br> ^ keyValue asCharacter.<br> ].</div>
<div> peekEvent := sensor peekEvent.<br> peekEvent ifNotNil: [<br> pressType := peekEvent fourth.<br> ].<br> "peekEvent printString displayAt: <a href="mailto:0@0">0@0</a>."<br> (peekEvent notNil and: [(peekEvent at: 4) = EventKeyDown])<br>
ifTrue: [sensor nextEvent.<br> peekEvent := sensor peekEvent.<br> peekEvent ifNotNil: [<br> pressType := peekEvent fourth.<br> ].<br> ].<br> (type = #keystroke<br> and: [peekEvent notNil<br> and: [(peekEvent at: 1)<br>
= EventTypeKeyboard<br> and: [(peekEvent at: 4)<br> = EventKeyChar]]])<br> ifTrue: [<br> firstCharacter := char1Value asCharacter.<br> secondCharacter := (peekEvent at: 3) asCharacter macToSqueak.<br>
stream := ReadStream on: (String with: firstCharacter with: secondCharacter).<br> multiCharacter := converter nextFromStream: stream.<br> multiCharacter isCharacter ifTrue: [<br> multiCharacter isOctetCharacter ifFalse: [ sensor nextEvent ].<br>
].<br> ^ multiCharacter.<br> ].<br> ^ keyValue asCharacter.<br>! !</div>
<div class="gmail_quote">在 2011年1月30日 下午2:14,Eric <span dir="ltr"><<a href="mailto:ericqiu@gmail.com">ericqiu@gmail.com</a>></span>写道:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div class="gmail_quote">
<div class="im">
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div> </div>>Were you able to inspect the decoded character values? If the decoding is<br>>right then the issue is with fonts. See isFontAvailable and installFont<br>>methods in LanguageEnvironment to see how to load language-specific fonts on<br>
>startup. GreekEnvironment and JapaneseEnvironment classes depend on such<br>>external font files.<br>
<div><br></div></blockquote></div>
<div>The decoding is correct, for example, a chinese character ‘中', the UTF8 decoding is 25185837, but the dispaly in the workspace is ??, </div>
<div> I inpsect on : </div>
<div> (SimplifiedChineseEnvironment new) isFontAvailable, </div>
<div>it return false to me.</div>
<div> </div>
<div>and i run following to installFont:</div>
<div> (Locale isoLanguage: 'zh') languageEnvironment fontDownload.</div>
<div>seems not font support on the net, any suggestion on how could i got the font for chinese?</div>
<div> </div>
<div>And also i have read the chinese support codes developed by Yo, it does work on Squeak 3,8 and 3,9, but it doesn't work on 4.1, I don't understanding what the different feature on Squeak4.1 on Language support side?</div>
<div><br>Subbu<br></div></div><br></blockquote></div><br>