Comment #9 on issue 3663 by
[hidden email]: XMLWriter and
MultiByteFileStream
http://code.google.com/p/pharo/issues/detail?id=3663As I had hit the same bug, I may propose the mine solution. It is in change
of the XMLWriter itself.
'From Pharo1.4 of 18 April 2012 [Latest update: #14438] on 17 July 2012 at
2:43:58 am'!
!XMLWriter methodsFor: 'private' stamp: 'MikhailBalkarov 7/17/2012 02:30'!
writeXmlEncoded: aString
"Correct WideString version
It is straightforward but even faster on Pharo without an acceleration of
the string lookup
"
aString do:[:char|
char caseOf:{
[$"]->[self nextPutAll:'"'].
[$&]->[self nextPutAll:'&'].
[$<]->[self nextPutAll:'<'].
[$>]->[self nextPutAll:'>'].
[LineFeed]->[self lineBreak].
[CarriageReturn]->[self lineBreak].
} otherwise:[
self nextPut:char."Ordinary character"
].
].
! !
_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker