diff -r 9edc418a1285 -r af8380fdd678 CharacterArray.st --- a/CharacterArray.st Tue Aug 21 12:41:18 2018 +0200 +++ b/CharacterArray.st Wed Aug 22 09:50:48 2018 +0200 @@ -6241,18 +6241,20 @@ ! printXmlTextQuotedOn:aStream + "convert aString to a valid XML string that can be used for XML text. Here line formatting characters are not escaped. - TODO: care for 16bit UNICODE string and escape chars ..." + TODO: care for 16bit UNICODE string and escape chars ... + TODO: check why apos and quot are not generated here" self do:[:eachChar | eachChar == $< ifTrue:[ aStream nextPutAll:'<' "mapping needed for xml text" ] ifFalse:[ eachChar == $& ifTrue:[ aStream nextPutAll:'&' "mapping needed for all" -"/ ] ifFalse:[ eachChar == $> ifTrue:[ -"/ aStream nextPutAll:'>' "mapping needed for comments" + ] ifFalse:[ eachChar == $> ifTrue:[ + aStream nextPutAll:'>' "mapping needed for comments" "/ ] ifFalse:[ eachChar == $' ifTrue:[ "/ aStream nextPutAll:''' "mapping needed for attributes" "/ ] ifFalse:[ eachChar == $" ifTrue:[ @@ -6263,12 +6265,21 @@ ((codePoint < 16r20 and:[codePoint ~~ 9 and:[codePoint ~~ 10 and:[codePoint ~~ 13]]]) or:[codePoint >= 16r7F]) ifTrue:[ aStream nextPutAll:'&#'. - codePoint printOn:aStream. + codePoint printOn:aStream base:16. aStream nextPut:$;. ] ifFalse:[ aStream nextPut:eachChar - ]]]"/]]] - ]. + ]]]]"/]] + ]. + + " + String streamContents:[:s|'< & >' printXmlTextQuotedOn:s] + String streamContents:[:s|'< & >',(Character value:7) printXmlTextQuotedOn:s] + String streamContents:[:s|'< & >',(Character value:129) printXmlTextQuotedOn:s] + String streamContents:[:s|'< & >',(Character value:1000) printXmlTextQuotedOn:s] + " + + "Modified (comment): / 22-08-2018 / 09:00:40 / Claus Gittinger" ! xmlQuotedPrintString @@ -6421,7 +6432,10 @@ and that singleByteStrings are therefore both unicode AND 8859-1 encoded." - ^ #unicode + ^ #'iso10646-1'. + "/ ^ #unicode + + "Modified: / 22-08-2018 / 09:30:16 / Claus Gittinger" ! hasChangeOfEmphasis