'From etoys2.2 of 1 October 2007 [latest update: #1732] on 29 October 2007 at 7:43:08 pm'! "Change Set: NewClipboard-yo Date: 29 October 2007 Author: Yoshiki Ohshima Make simple text clipboard work on newer and older VMs."SqueakDebug! UTF8ClipboardInterpreter subclass: #UTF8JPClipboardInterpreter instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'Multilingual-TextConversion'! !LanguageEnvironment class methodsFor: 'public query' stamp: 'KR 10/18/2007 18:59'! defaultClipboardInterpreter ClipboardInterpreterClass ifNil: [ClipboardInterpreterClass := self currentPlatform class clipboardInterpreterClass]. ^ ClipboardInterpreterClass new. ! ! !JapaneseEnvironment class methodsFor: 'subclass responsibilities' stamp: 'yo 10/29/2007 19:36'! clipboardInterpreterClass | platformName osVersion | platformName := SmalltalkImage current platformName. osVersion := SmalltalkImage current getSystemAttribute: 1002. (platformName = 'Win32' and: [osVersion = 'CE']) ifTrue: [^NoConversionClipboardInterpreter]. platformName = 'Win32' ifTrue: [^self win32VMUsesUnicode ifTrue: [UTF8JPClipboardInterpreter] ifFalse: [WinShiftJISClipboardInterpreter]]. platformName = 'Mac OS' ifTrue: [^MacShiftJISClipboardInterpreter]. ^platformName = 'unix' ifTrue: [(ShiftJISTextConverter encodingNames includes: X11Encoding getEncoding) ifTrue: [MacShiftJISClipboardInterpreter] ifFalse: [UnixJPClipboardInterpreter]] ifFalse: [ NoConversionClipboardInterpreter ]! ! !KoreanEnvironment class methodsFor: 'as yet unclassified' stamp: 'yo 10/29/2007 17:44'! clipboardInterpreterClass | platformName osVersion | platformName := SmalltalkImage current platformName. osVersion := SmalltalkImage current getSystemAttribute: 1002. (platformName = 'Win32' and: [osVersion = 'CE']) ifTrue: [^NoConversionClipboardInterpreter]. platformName = 'Win32' ifTrue: [^self win32VMUsesUnicode ifTrue: [UTF8ClipboardInterpreter] ifFalse: [WinKSX1001ClipboardInterpreter]]. platformName = 'Mac OS' ifTrue: [('10*' match: SmalltalkImage current osVersion) ifTrue: [^NoConversionClipboardInterpreter] ifFalse: [^WinKSX1001ClipboardInterpreter]]. platformName = 'unix' ifTrue: [(ShiftJISTextConverter encodingNames includes: X11Encoding getEncoding) ifTrue: [^WinKSX1001ClipboardInterpreter] ifFalse: [^NoConversionClipboardInterpreter]]. ^NoConversionClipboardInterpreter! ! !Latin1Environment class methodsFor: 'subclass responsibilities' stamp: 'yo 10/29/2007 17:50'! clipboardInterpreterClass | platformName | platformName := SmalltalkImage current platformName. platformName = 'Win32' ifTrue: [^self win32VMUsesUnicode ifTrue: [UTF8ClipboardInterpreter]]. ^ MacRomanClipboardInterpreter! ! !Latin2Environment class methodsFor: 'subclass responsibilities' stamp: 'yo 10/29/2007 17:51'! clipboardInterpreterClass | platformName | platformName := SmalltalkImage current platformName. platformName = 'Win32' ifTrue: [^self win32VMUsesUnicode ifTrue: [UTF8ClipboardInterpreter]]. platformName = 'unix' ifTrue: [ISO88592ClipboardInterpreter]. ^ MacRomanClipboardInterpreter ! ! !SimplifiedChineseEnvironment class methodsFor: 'subclass responsibilities' stamp: 'yo 10/29/2007 17:45'! clipboardInterpreterClass | platformName osVersion | platformName := SmalltalkImage current platformName. osVersion := SmalltalkImage current getSystemAttribute: 1002. (platformName = 'Win32' and: [osVersion = 'CE']) ifTrue: [^NoConversionClipboardInterpreter]. platformName = 'Win32' ifTrue: [^self win32VMUsesUnicode ifTrue: [UTF8ClipboardInterpreter] ifFalse: [WinGB2312ClipboardInterpreter]]. platformName = 'Mac OS' ifTrue: [('10*' match: SmalltalkImage current osVersion) ifTrue: [^NoConversionClipboardInterpreter] ifFalse: [^WinGB2312ClipboardInterpreter]]. platformName = 'unix' ifTrue: [(ShiftJISTextConverter encodingNames includes: X11Encoding getEncoding) ifTrue: [^MacShiftJISClipboardInterpreter] ifFalse: [^NoConversionClipboardInterpreter]]. ^NoConversionClipboardInterpreter! ! !UTF8JPClipboardInterpreter methodsFor: 'as yet unclassified' stamp: 'yo 10/29/2007 17:47'! fromSystemClipboard: aString ^aString convertFromWithConverter: UTF8TextConverter new. ! !