--- a/CharacterSetView.st Thu Jul 12 13:06:32 2012 +0200
+++ b/CharacterSetView.st Thu Jul 12 15:46:07 2012 +0200
@@ -157,7 +157,7 @@
insertCharacter := [:char |
(char isString ifTrue:[char] ifFalse:[Array with:char])
do:[:char | |unicodePoint unicodeChar|
- unicodePoint := CharacterEncoder encode:(char codePoint) from:aView characterEncoding into:#'unicode'.
+ unicodePoint := CharacterEncoder encode:(char codePoint) from:aView characterEncoding into:#unicode.
unicodeChar := Character value:unicodePoint.
aView dispatchEvent:(WindowEvent keyPress:unicodeChar x:0 y:0 view:v).
aView dispatchEvent:(WindowEvent keyRelease:unicodeChar x:0 y:0 view:v).
@@ -175,7 +175,7 @@
codePointLabel label:clickLabel
] ifFalse:[
selectedChar := Character value:selectedCodePoint.
- (#('unicde' 'iso10646-1' 'iso8859-1' 'ascii') includes:(v font encoding))
+ (#(unicode #'iso10646-1' #'iso8859-1' ascii) includes:(v font encoding))
ifTrue:[
isLetter := selectedChar isNationalLetter.
isDigit := selectedChar isNationalDigit.
@@ -388,7 +388,11 @@
codePoint := (codePage * 16r100) + (rowBase + col).
encoderOrNil notNil ifTrue:[
- decodedCodePoint := (encoderOrNil decode:codePoint) ? 0
+ [
+ decodedCodePoint := (encoderOrNil decode:codePoint) ? 0
+ ] on:DecodingError do:[:ex|
+ decodedCodePoint := ex defaultValue.
+ ].
] ifFalse:[
decodedCodePoint := codePoint
].
@@ -560,9 +564,9 @@
!CharacterSetView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg2/CharacterSetView.st,v 1.26 2012-07-12 11:06:32 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg2/CharacterSetView.st,v 1.27 2012-07-12 13:46:07 stefan Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libwidg2/CharacterSetView.st,v 1.26 2012-07-12 11:06:32 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg2/CharacterSetView.st,v 1.27 2012-07-12 13:46:07 stefan Exp $'
! !