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

<div><br>Subbu<br></div></div><br></blockquote></div><br>