<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Yes. That method used a String to store bytes. It was a common
practice in the old days, but it breaks with UTF-8. It is best to
use ByteArrays for that.<br>
<br>
On 3/25/2023 2:55 PM, Bernhard Pieber via Cuis-dev wrote:
<blockquote
cite="mid:B43E7DE3-D42A-4ABD-8DD2-F4CBC0BA3299@pieber.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
I just realised that this is probably no corruption but just a
conversion to UTF-8. The method #testOldInstanceDeserialization is
a special method which contains binary data. In any case the
package file could be installed without problems in a new image.
<div class=""><br class="">
</div>
<div class="">Sorry for the noise.</div>
<div class=""><br class="">
</div>
<div class="">The testOldInstanceDeserialization test fails,
though, as do many others (mostly having to do with pasting and
RTF conversion).
<div class=""><br class="">
</div>
<div class="">Bernhard</div>
<div class=""><br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">Am 25.03.2023 um 18:20 schrieb Bernhard
Pieber via Cuis-dev <<a moz-do-not-send="true"
href="mailto:cuis-dev@lists.cuis.st" class="">cuis-dev@lists.cuis.st</a>>:</div>
<br class="Apple-interchange-newline">
<div class="">
<div style="word-wrap: break-word;" class="">Hi
everyone,
<div class=""><br class="">
</div>
<div class="">When I load the StyledTextEditor in a
updated image and save the <a
moz-do-not-send="true"
href="http://styledtext.pck.st/" class="">StyledText.pck.st</a> it
seems to get corrupted. This is how it looks like in
git diff:</div>
<div class="">
<div style="margin: 0px; font-stretch: normal;
font-size: 11px; line-height: normal; font-family:
Menlo;" class=""><span style="" class="">bernhard@MacBookPro16
StyledTextEditor % git diff</span></div>
<div style="margin: 0px; font-stretch: normal;
font-size: 11px; line-height: normal; font-family:
Menlo;" class=""><span style="" class=""><b
class="">diff --git a/<a
moz-do-not-send="true"
href="http://styledtext.pck.st/" class="">StyledText.pck.st</a>
b/<a moz-do-not-send="true"
href="http://styledtext.pck.st/" class="">StyledText.pck.st</a></b></span></div>
<div style="margin: 0px; font-stretch: normal;
font-size: 11px; line-height: normal; font-family:
Menlo;" class=""><span style="" class=""><b
class="">index f400d0f..f7a1471 100644</b></span></div>
<div style="margin: 0px; font-stretch: normal;
font-size: 11px; line-height: normal; font-family:
Menlo;" class=""><span style="" class=""><b
class="">--- a/<a moz-do-not-send="true"
href="http://styledtext.pck.st/" class="">StyledText.pck.st</a></b></span></div>
<div style="margin: 0px; font-stretch: normal;
font-size: 11px; line-height: normal; font-family:
Menlo;" class=""><span style="" class=""><b
class="">+++ b/<a moz-do-not-send="true"
href="http://styledtext.pck.st/" class="">StyledText.pck.st</a></b></span></div>
<div style="margin: 0px; font-stretch: normal;
font-size: 11px; line-height: normal; font-family:
Menlo; color: rgb(46, 174, 187);" class=""><span
style="" class="">@@ -1,4 +1,4 @@</span></div>
<div style="margin: 0px; font-stretch: normal;
font-size: 11px; line-height: normal; font-family:
Menlo; color: rgb(180, 36, 25);" class=""><span
style="" class="">-'From Cuis 6.0 [latest
update: #5202] on 26 May 2022 at 12:49:33 pm'!</span></div>
<div style="margin: 0px; font-stretch: normal;
font-size: 11px; line-height: normal; font-family:
Menlo; color: rgb(47, 180, 29);" class=""><span
style="" class="">+'From Cuis 6.0 [latest
update: #5718] on 25 March 2023 at 5:58:07 pm'!</span></div>
<div style="margin: 0px; font-stretch: normal;
font-size: 11px; line-height: normal; font-family:
Menlo;" class=""><span style="" class=""> 'Description
Please enter a description for this package.'!</span></div>
<div style="margin: 0px; font-stretch: normal;
font-size: 11px; line-height: normal; font-family:
Menlo;" class=""><span style="" class=""> !provides:
'StyledText' 1 57!</span></div>
<div style="margin: 0px; font-stretch: normal;
font-size: 11px; line-height: normal; font-family:
Menlo;" class=""><span style="" class=""> !requires:
'Cuis-Base' 42 2621 nil!</span></div>
<div style="margin: 0px; font-stretch: normal;
font-size: 11px; line-height: normal; font-family:
Menlo;" class=""><span style="color: rgb(46, 174,
187);" class="">@@ -850,7 +850,7 @@</span><span
style="" class="">
createFeaturesParagraphStyleSet</span></div>
<div style="margin: 0px; font-stretch: normal;
font-size: 11px; line-height: normal; font-family:
Menlo;" class=""><span style="" class="">
bulleted privateFamilyName: familyName
pointSize: 11 emphasis: 0 color: nil</span></div>
<div style="margin: 0px; font-stretch: normal;
font-size: 11px; line-height: normal; font-family:
Menlo;" class=""><span style="" class="">
alignment: CharacterScanner justifiedCode
firstIndent: 10 restIndent: 30 rightIndent: 10</span></div>
<div style="margin: 0px; font-stretch: normal;
font-size: 11px; line-height: normal; font-family:
Menlo;" class=""><span style="" class="">
spaceBefore: 8 spaceAfter: 2;</span></div>
<div style="margin: 0px; font-stretch: normal;
font-size: 11px; line-height: normal; font-family:
Menlo; color: rgb(180, 36, 25);" class=""><span
style="" class="">-
privateListBulletPattern: '</span><span
style="color: rgb(255, 255, 255);
background-color: rgb(133, 0, 2);" class=""><B0></span><span
style="" class=""> '.</span></div>
<div style="margin: 0px; font-stretch: normal;
font-size: 11px; line-height: normal; font-family:
Menlo; color: rgb(47, 180, 29);" class=""><span
style="" class="">+</span><span style=""
class=""> </span><span
style="" class="">privateListBulletPattern: '°
'.</span></div>
<div style="margin: 0px; font-stretch: normal;
font-size: 11px; line-height: normal; font-family:
Menlo; min-height: 13px;" class=""><span style=""
class=""> </span><br
class="webkit-block-placeholder">
</div>
<div style="margin: 0px; font-stretch: normal;
font-size: 11px; line-height: normal; font-family:
Menlo;" class=""><span style="" class="">
smalltalkCode _ self paragraphStyleNamedOrNew:
'Smalltalk code'.</span></div>
<div style="margin: 0px; font-stretch: normal;
font-size: 11px; line-height: normal; font-family:
Menlo;" class=""><span style="" class="">
smalltalkCode privateFamilyName: familyName
pointSize: 11 emphasis: 0 color: nil</span></div>
<div style="margin: 0px; font-stretch: normal;
font-size: 11px; line-height: normal; font-family:
Menlo;" class=""><span style="color: rgb(46, 174,
187);" class="">@@ -953,7 +953,7 @@</span><span
style="" class=""> createSampleParagraphStyleSet</span></div>
<div style="margin: 0px; font-stretch: normal;
font-size: 11px; line-height: normal; font-family:
Menlo;" class=""><span style="" class="">
bulleted privateFamilyName: familyName
pointSize: s emphasis: 0 color: nil</span></div>
<div style="margin: 0px; font-stretch: normal;
font-size: 11px; line-height: normal; font-family:
Menlo;" class=""><span style="" class="">
alignment: CharacterScanner justifiedCode
firstIndent: s restIndent: s*3 rightIndent: s</span></div>
<div style="margin: 0px; font-stretch: normal;
font-size: 11px; line-height: normal; font-family:
Menlo;" class=""><span style="" class="">
spaceBefore: s*8//10 spaceAfter: s*2//10;</span></div>
<div style="margin: 0px; font-stretch: normal;
font-size: 11px; line-height: normal; font-family:
Menlo; color: rgb(180, 36, 25);" class=""><span
style="" class="">-
privateListBulletPattern: '</span><span
style="color: rgb(255, 255, 255);
background-color: rgb(133, 0, 2);" class=""><B0></span><span
style="" class=""> '.</span></div>
<div style="margin: 0px; font-stretch: normal;
font-size: 11px; line-height: normal; font-family:
Menlo; color: rgb(47, 180, 29);" class=""><span
style="" class="">+</span><span style=""
class=""> </span><span
style="" class="">privateListBulletPattern: '°
'.</span></div>
<div style="margin: 0px; font-stretch: normal;
font-size: 11px; line-height: normal; font-family:
Menlo; min-height: 13px;" class=""><span style=""
class=""> </span><br
class="webkit-block-placeholder">
</div>
<div style="margin: 0px; font-stretch: normal;
font-size: 11px; line-height: normal; font-family:
Menlo;" class=""><span style="" class="">
smalltalkCode _ self paragraphStyleNamedOrNew:
'Smalltalk code'.</span></div>
<div style="margin: 0px; font-stretch: normal;
font-size: 11px; line-height: normal; font-family:
Menlo;" class=""><span style="" class="">
smalltalkCode privateFamilyName: familyName
pointSize: s emphasis: 0 color: nil</span></div>
<div style="margin: 0px; font-stretch: normal;
font-size: 11px; line-height: normal; font-family:
Menlo;" class=""><span style="color: rgb(46, 174,
187);" class="">@@ -3289,49 +3289,49 @@</span><span
style="" class="">
testOldInstanceDeserialization</span></div>
<div style="margin: 0px; font-stretch: normal;
font-size: 11px; line-height: normal; font-family:
Menlo;" class=""><span style="" class="">
oldFormat _ '</span><span style="color: rgb(255,
255, 255); background-color: rgb(0, 0, 0);"
class="">^D^@^@^@^D^H^@^@^@^D^Q^O</span><span
style="" class="">class structure </span><span
style="color: rgb(255, 255, 255);
background-color: rgb(0, 0, 0);" class="">^@^@^@^C^F</span></div>
<div style="margin: 0px; font-stretch: normal;
font-size: 11px; line-height: normal; font-family:
Menlo; color: rgb(255, 255, 255);" class=""><span
style="" class=""> Dictionary</span><span
style="background-color: rgb(0, 0, 0);" class="">^D^@^@^@^T^H^@^@^@</span><span
style="" class="">0</span><span
style="background-color: rgb(0, 0, 0);" class="">^A^A^A^A</span><span
style="" class=""> </span><span
style="background-color: rgb(0, 0, 0);" class="">^@^@^@^C^F^K</span><span
style="" class="">Association</span><span
style="background-color: rgb(0, 0, 0);" class="">^F^F</span><span
style="" class="">Objec</span><span
style="background-color: rgb(0, 0, 0);" class="">^@^@^@^A^D^@^@^@^@^A^P^C^@</span><span
style="" class="">?</span><span
style="background-color: rgb(0, 0, 0);" class="">^F^V</span><span
style="" class="">SequenceableCollectio</span><span
style="background-color: rgb(0, 0, 0);" class="">^@^@^@^A^D^@^@^@^@^A^P^C^@</span><span
style="" class="">?</span><span
style="background-color: rgb(0, 0, 0);" class="">^F^O</span><span
style="" class="">StyledTextMode</span><span
style="background-color: rgb(0, 0, 0);" class="">^@^@^@^C^D^@^@^@^@^Q</span><span
style="" class=""> actionMap</span><span
style="background-color: rgb(0, 0, 0);" class="">^Q^N</span><span
style="" class="">actualContents</span><span
style="background-color: rgb(0, 0, 0);" class="">^A^A^A^A^A^A^A^A^A^A^P^C^@</span><span
style="" class="">?</span><span
style="background-color: rgb(0, 0, 0);" class="">^F^E</span><span
style="" class="">Poin</span><span
style="background-color: rgb(0, 0, 0);" class="">^@^@^@^C^D^@^@^@^@^Q^A</span><span
style="" class="">x</span><span
style="background-color: rgb(0, 0, 0);" class="">^Q^A</span><span
style="" class="">y</span><span
style="background-color: rgb(0, 0, 0);" class="">^A^A^A^A^A^P^C^@</span><span
style="" class="">?</span><span
style="background-color: rgb(0, 0, 0);" class="">^F^H</span><span
style="" class="">RunArra</span><span
style="background-color: rgb(0, 0, 0);" class="">^@^@^@^G^D^@^@^@^@^Q^D</span><span
style="" class="">runs</span><span
style="background-color: rgb(0, 0, 0);" class="">^Q^F</span><span
style="" class="">values</span><span
style="background-color: rgb(0, 0, 0);" class="">^Q</span><span
style="" class=""> lastIndex</span><span
style="background-color: rgb(0, 0, 0);" class="">^Q^G</span><span
style="" class="">lastRun</span><span
style="background-color: rgb(0, 0, 0);" class="">^Q</span></div>
<div style="margin: 0px; font-stretch: normal;
font-size: 11px; line-height: normal; font-family:
Menlo;" class=""><span style="" class=""> lastOffset</span><span
style="color: rgb(255, 255, 255);
background-color: rgb(0, 0, 0);" class="">^Q^N</span><span
style="" class="">canJoinMessage</span><span
style="color: rgb(255, 255, 255);
background-color: rgb(0, 0, 0);" class="">^P^C^@</span><span
style="" class="">?</span><span style="color:
rgb(255, 255, 255); background-color: rgb(0, 0,
0);" class="">^F^K</span><span style="" class="">ActiveMode</span><span
style="color: rgb(255, 255, 255);
background-color: rgb(0, 0, 0);" class="">^@^@^@^B^D^@^@^@^@</span></div>
<div style="margin: 0px; font-stretch: normal;
font-size: 11px; line-height: normal; font-family:
Menlo; color: rgb(255, 255, 255);" class=""><span
style="color: rgb(180, 36, 25);" class="">-</span><span
style="background-color: rgb(133, 0, 2);"
class="">^@^@^@<A5>^P^C^@</span><span
style="color: rgb(180, 36, 25);" class="">?</span><span
style="background-color: rgb(133, 0, 2);"
class="">^F^F</span><span style="color: rgb(180,
36, 25);" class="">Symbo</span><span
style="background-color: rgb(133, 0, 2);"
class="">^@^@^@^A^D^@^@^@^@^A^P^C^@</span><span
style="color: rgb(180, 36, 25);" class="">?</span><span
style="background-color: rgb(133, 0, 2);"
class="">^F^Q</span><span style="color: rgb(180,
36, 25);" class="">ArrayedCollectio</span><span
style="background-color: rgb(133, 0, 2);"
class="">^@^@^@^A^D^@^@^@^@^P^C^@</span><span
style="color: rgb(180, 36, 25);" class="">?</span><span
style="background-color: rgb(133, 0, 2);"
class="">^F^F</span><span style="color: rgb(180,
36, 25);" class="">Numbe</span><span
style="background-color: rgb(133, 0, 2);"
class="">^@^@^@^A^D^@^@^@^@^P^C^@</span><span
style="color: rgb(180, 36, 25);" class="">?</span><span
style="background-color: rgb(133, 0, 2);"
class="">^F</span><span style="color: rgb(180,
36, 25);" class=""> TextMode</span><span
style="background-color: rgb(133, 0, 2);"
class="">^@^@^@^C^D^@^@^@^@</span></div>
<div style="margin: 0px; font-stretch: normal;
font-size: 11px; line-height: normal; font-family:
Menlo; color: rgb(255, 255, 255);" class=""><span
style="color: rgb(180, 36, 25);" class="">-</span><span
style="background-color: rgb(133, 0, 2);"
class="">^@^@^@<A5></span></div>
<div style="margin: 0px; font-stretch: normal;
font-size: 11px; line-height: normal; font-family:
Menlo; color: rgb(255, 255, 255);" class=""><span
style="color: rgb(180, 36, 25);" class="">-</span><span
style="background-color: rgb(133, 0, 2);"
class="">^@^@^@<B0>^A^A^P^C^@</span><span
style="color: rgb(180, 36, 25);" class="">?</span><span
style="background-color: rgb(133, 0, 2);"
class="">^F^D</span><span style="color: rgb(180,
36, 25);" class="">Tex</span><span
style="background-color: rgb(133, 0, 2);"
class="">^@^@^@^C^D^@^@^@^@^Q^F</span><span
style="color: rgb(180, 36, 25);" class="">string</span><span
style="background-color: rgb(133, 0, 2);"
class="">^Q^D</span><span style="color: rgb(180,
36, 25);" class="">runs</span><span
style="background-color: rgb(133, 0, 2);"
class="">^P^C^@</span><span style="color:
rgb(180, 36, 25);" class="">?</span><span
style="background-color: rgb(133, 0, 2);"
class="">^F</span><span style="color: rgb(180,
36, 25);" class=""> Rectangl</span><span
style="background-color: rgb(133, 0, 2);"
class="">^@^@^@^C^D^@^@^@^@^Q^F</span><span
style="color: rgb(180, 36, 25);" class="">origin</span><span
style="background-color: rgb(133, 0, 2);"
class="">^Q^F</span><span style="color: rgb(180,
36, 25);" class="">corner</span><span
style="background-color: rgb(133, 0, 2);"
class="">^P^C^@</span><span style="color:
rgb(180, 36, 25);" class="">?</span><span
style="background-color: rgb(133, 0, 2);"
class="">^F^K</span><span style="color: rgb(180,
36, 25);" class="">ProtoObjec</span><span
style="background-color: rgb(133, 0, 2);"
class="">^@^@^@^A^D^@^@^@^@^A^A^P^C^@</span><span
style="color: rgb(180, 36, 25);" class="">?</span><span
style="background-color: rgb(133, 0, 2);"
class="">^F</span></div>
</div>
<div style="margin: 0px; font-stretch: normal;
line-height: normal;" class="">…</div>
<div style="margin: 0px; font-stretch: normal;
font-size: 11px; line-height: normal; font-family:
Menlo; color: rgb(255, 255, 255);" class=""><span
style="font-family: Helvetica; font-size: 12px;"
class=""><br class="">
</span></div>
<div style="margin: 0px; font-stretch: normal;
font-size: 11px; line-height: normal; font-family:
Menlo; color: rgb(255, 255, 255);" class=""><span
style="font-family: Helvetica; font-size: 12px;"
class="">I can reproduce it with these steps:</span></div>
<div style="margin: 0px; font-stretch: normal;
font-size: 11px; line-height: normal; font-family:
Menlo; color: rgb(255, 255, 255);" class=""><span
style="font-family: Helvetica; font-size: 12px;"
class=""><br class="">
</span></div>
<div style="margin: 0px; font-stretch: normal;
line-height: normal;" class="">
<div style="line-height: 18px; white-space: pre;"
class="">
<div style="background-color: rgb(255, 255, 255);
font-family: Menlo,Monaco,"Courier
New",monospace; font-size: 12px;" class="">mkdir
StyledTextEditor</div>
<div style="background-color: rgb(255, 255, 255);
font-family: Menlo,Monaco,"Courier
New",monospace; font-size: 12px;" class="">cd
StyledTextEditor</div>
<div style="background-color: rgb(255, 255, 255);
font-family: Menlo,Monaco,"Courier
New",monospace; font-size: 12px;" class="">git
clone --depth 1 <a moz-do-not-send="true"
href="https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev.git"
class="">https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev.git</a></div>
<div style="background-color: rgb(255, 255, 255);
font-family: Menlo,Monaco,"Courier
New",monospace; font-size: 12px;" class="">curl
-L -o squeak.cog.spur_macos64x64.dmg <a
moz-do-not-send="true"
href="https://github.com/OpenSmalltalk/opensmalltalk-vm/releases/download/202206021410/squeak.cog.spur_macos64x64.dmg"
class="">https://github.com/OpenSmalltalk/opensmalltalk-vm/releases/download/202206021410/squeak.cog.spur_macos64x64.dmg</a></div>
<div class="">Mount .dmg and copy Squeak.app to
folder StyledTextEditor</div>
<div style="background-color: rgb(255, 255, 255);
font-family: Menlo,Monaco,"Courier
New",monospace; font-size: 12px;" class="">git
clone <a moz-do-not-send="true"
href="https://github.com/Cuis-Smalltalk/StyledTextEditor.git"
class="">https://github.com/Cuis-Smalltalk/StyledTextEditor.git</a></div>
<div style="background-color: rgb(255, 255, 255);
font-family: Menlo,Monaco,"Courier
New",monospace; font-size: 12px;" class="">git
clone <a moz-do-not-send="true"
href="https://github.com/Cuis-Smalltalk/Morphic.git"
class="">https://github.com/Cuis-Smalltalk/Morphic.git</a></div>
<div style="background-color: rgb(255, 255, 255);
font-family: Menlo,Monaco,"Courier
New",monospace; font-size: 12px;" class="">./Squeak.app/Contents/MacOS/Squeak
Cuis-Smalltalk-Dev/Cuis6.0-5686.image</div>
<font class="" face="Menlo, Monaco, Courier New,
monospace"><span style="background-color:
rgb(255, 255, 255);" class=""><br class="">
</span></font>
<div class="">In Cuis do:</div>
<div style="background-color: rgb(255, 255, 255);
font-family: Menlo,Monaco,"Courier
New",monospace; font-size: 12px;" class="">ChangeSet
installNewChanges.</div>
<div style="background-color: rgb(255, 255, 255);
font-family: Menlo,Monaco,"Courier
New",monospace; font-size: 12px;" class="">Feature
require: 'StyledText'.</div>
<div class="">Open > Installed Packages</div>
<div class="">Select StyledText 1.57.</div>
<div class="">Delete the description</div>
<div class="">Click save</div>
<font class="" face="Menlo, Monaco, Courier New,
monospace"><span style="background-color:
rgb(255, 255, 255);" class=""><br class="">
</span></font>
<div class="">Back in the terminal:</div>
<div style="background-color: rgb(255, 255, 255);
font-family: Menlo,Monaco,"Courier
New",monospace; font-size: 12px;" class="">cd
StyledTextEditor</div>
<div style="background-color: rgb(255, 255, 255);
font-family: Menlo,Monaco,"Courier
New",monospace; font-size: 12px;" class="">git
diff</div>
<div style="background-color: rgb(255, 255, 255);
font-family: Menlo,Monaco,"Courier
New",monospace; font-size: 12px;" class=""><br
class="">
</div>
<div class="">When I save the package Compression
1.32 no such corruption seems to occur. Has
anyone encountered this type of problem in some
other package?</div>
<div class=""><br class="">
</div>
<div class="">Cheers,</div>
<div class="">Bernhard</div>
</div>
</div>
<div style="margin: 0px; font-stretch: normal;
font-size: 11px; line-height: normal; font-family:
Menlo; color: rgb(255, 255, 255);" class=""><br
class="">
</div>
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Juan Vuletich
cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
linkedin.com/in/juan-vuletich-75611b3
twitter.com/JuanVuletich</pre>
</body>
</html>