[Pharo-users] Lost in stream

Sven Van Caekenberghe sven at stfx.eu
Fri Jun 15 14:40:46 EDT 2018


I don't see anything wrong with Toto-Wrong.png.

As for the XML part, the following seemed to work:

xmldoc := (FileLocator desktop / 'Toto-ok.fgeo') readStreamDo: [ :in | XMLDOMParser parse: in ].

(FileLocator desktop / 'drgeo.xml') writeStreamDo: [ :out | xmldoc writeXMLOn: (XMLWriter on: out) ].

I know this is the DOM parser, not the SAX parser, but as far as streams are concerned, XML* seems to work OK.

> On 15 Jun 2018, at 19:17, Hilaire <hilaire at drgeo.eu> wrote:
> 
> I investigated a bit more the other issue, and it looks like XML entities are not correctly decoded when read from the newer File API. Somehow it is related to stream I guess.
> 
> For example, drgeo document starting like:
> 
> <?xml version="1.0"?>
> <drgenius><drgeo name="Triangle homoth&#xE9;tie">
> 
> are correctly decoded with DrGeo 17.07, but not with the newer one.
> 
> When debugging, it looks like there is a jump at the end of the entity, the $; character is not returned by the (self next) in the SAX Driver.
> 
> May be I used the wrong stream when opening the doc, but I don't know, the stream was open as:
> 
> 'triangle-scale.fgeo' asFileReference readStream
> 
> Hilaire
> 
> 
> Le 15/06/2018 à 18:31, Hilaire a écrit :
>> I already met fragilities with some file when loading older drgeo document, but I have not fully tracked the issue.
> 
> -- 
> Dr. Geo
> http://drgeo.eu
> 
> 
> 




More information about the Pharo-users mailing list