--- a/CharacterEncoderImplementations__ISO10646_to_UTF8_MAC.st Fri Feb 20 17:13:42 2015 +0100
+++ b/CharacterEncoderImplementations__ISO10646_to_UTF8_MAC.st Fri Feb 20 19:50:00 2015 +0100
@@ -181,23 +181,25 @@
|s buff previous|
s := super decodeString:aStringOrByteCollection.
- (s contains:[:char | char codePoint between:16r0300 and:16r030F]) ifTrue:[
- buff := CharacterWriteStream on:''.
- previous := nil.
- s do:[:each |
- (each codePoint between:16r0300 and:16r030F) ifTrue:[
- self compositionOf:previous with:each to:buff.
- previous := nil.
- ] ifFalse:[
- previous notNil ifTrue:[
- buff nextPut:previous.
- ].
- previous := each.
+ (s contains:[:char | char codePoint between:16r0300 and:16r030F]) ifFalse:[^ s].
+
+ buff := CharacterWriteStream on:''.
+ previous := nil.
+ s do:[:each |
+ (each codePoint between:16r0300 and:16r030F) ifTrue:[
+ self compositionOf:previous with:each to:buff.
+ previous := nil.
+ ] ifFalse:[
+ previous notNil ifTrue:[
+ buff nextPut:previous.
].
+ previous := each.
].
- ^ buff contents.
].
- ^ s
+ previous notNil ifTrue:[
+ buff nextPut:previous.
+ ].
+ ^ buff contents.
"
(ISO10646_to_UTF8 new encodeString:'aäoöuü') asByteArray
@@ -323,6 +325,9 @@
-> #[97 195 164 111 195 182 117 195 188]
(ISO10646_to_UTF8_MAC new encodeString:'aäoöuü') asByteArray
-> #[97 97 204 136 111 111 204 136 117 117 204 136]
+
+ ISO10646_to_UTF8_MAC new decodeString:
+ (ISO10646_to_UTF8_MAC new encodeString:'Packages aus VSE für Smalltalk_X') asByteArray
"
! !
@@ -335,10 +340,10 @@
!ISO10646_to_UTF8_MAC class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__ISO10646_to_UTF8_MAC.st,v 1.2 2015-02-18 17:56:03 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__ISO10646_to_UTF8_MAC.st,v 1.3 2015-02-20 18:50:00 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__ISO10646_to_UTF8_MAC.st,v 1.2 2015-02-18 17:56:03 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__ISO10646_to_UTF8_MAC.st,v 1.3 2015-02-20 18:50:00 cg Exp $'
! !