Not at the same time on the same file. #put:into is use in one situation
to write out a sketch as a XML file, and in another situation to write
out a PNG image.
However, It is true DrGeo xml document can embed bitmap, but it is
base64 encoded, so saving with readStream is not a problem.
I am stil
You said you wanted to write both character data (XML) as binary data (images)
to the same stream, or so I understood.
> On 26 Jul 2019, at 00:22, Hilaire wrote:
>
> I don't understand how #wrappedStream works in my situation?
>
> Is #isBinary not good enougth?
>
> Le 25/07/2019 à 21:53, Sven
I don't understand how #wrappedStream works in my situation?
Is #isBinary not good enougth?
Le 25/07/2019 à 21:53, Sven Van Caekenberghe a écrit :
> If you have a character read or write stream, you can use #wrappedStream to
> access the underlying binary stream, should you need to do that.
>
>>
If you have a character read or write stream, you can use #wrappedStream to
access the underlying binary stream, should you need to do that.
> On 25 Jul 2019, at 20:31, Hilaire wrote:
>
> Thanks for the tips. It is definitely a left over from porting DrGeo to
> P7 from P4/5/6 (not sure)
>
> Bu
Thanks for the tips. It is definitely a left over from porting DrGeo to
P7 from P4/5/6 (not sure)
But it can't really work as put:into: is used to write both sktech
content (XML file) and its PNG preview.
At some point in Pharo history both UTF8 and bitmap were using binary
stream.
Likely a putB
That is correct, sk.
#writeStreamDo: is enough though, #utf8 is the default encoding
> On 24 Jul 2019, at 22:16, sk via Pharo-users
> wrote:
>
>
> From: sk
> Subject: Re: [Pharo-users] P7 regression
> Date: 24 July 2019 at 22:16:50 GMT+2
> To: Any question about phar
--- Begin Message ---
Hi Hilaire
I downloaded latest Dr Geo and took a quick look at how the files are saved.
It looks like the xml contents are not encoded (in UTF-8) but simply written to
a binary write stream, which means that when a WideString is written you should
consistently get a badly
[...]
stream := WriteStream on: (String new: 4000).
DrGeoXml new
app: self app;
saveOn: stream.
[...]
DrGeoXml>>saveOn: stream
| doc writer root |
doc := XMLDocument new version: '1.0'.
writer := XMLWriter on: stream.
root := XMLElement named: #drgenius.
self writeFigureA
> On 24 Jul 2019, at 17:32, Hilaire wrote:
>
> Hi Sven,
>
> Le 24/07/2019 à 17:05, Sven Van Caekenberghe a écrit :
>> Can you include the file that you are trying to load ?
>
> Attached.
>
> It looks like issue come when saving the file. The UTF8 characters are
> not saved properly. The uni
Hi Sven,
Le 24/07/2019 à 17:05, Sven Van Caekenberghe a écrit :
> Can you include the file that you are trying to load ?
Attached.
It looks like issue come when saving the file. The UTF8 characters are
not saved properly. The unix file command was indicating it is an utf8
but Emacs shows it was
10 matches
Mail list logo