<div dir="ltr"><div>Hi Tobias,</div><div><br></div><div>Yeah, I saw that it was an MS Windows only thing.</div><div><br></div>It makes your head spin!!  <div><br></div><div>:) All the best,</div><div><br></div><div>Ron </div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 2, 2018 at 2:57 PM, Tobias Pape <span dir="ltr"><<a href="mailto:Das.Linux@gmx.de" target="_blank">Das.Linux@gmx.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Ron<br>
<span class=""><br>
> On 02.07.2018, at 20:42, Ron Teitelbaum <Ron@USMedRec.com> wrote:<br>
> <br>
> Hi Tobias,<br>
> <br>
> Interesting!  I think 128 is the Euro symbol in extended ASCII on MS Windows.<br>
<br>
</span>The Euro is 128 in Windows Codepage 1252, true. However, there's not one "true" extended Ascii, but everything that is 8-bit and includes ascii is somehow extended Ascii. To quote Wikipedia[<a href="https://en.wikipedia.org/wiki/Extended_ASCII" rel="noreferrer" target="_blank">https://en.<wbr>wikipedia.org/wiki/Extended_<wbr>ASCII</a>]: <br>
<br>
        "There are many extended ASCII encodings (more than 220 DOS and Windows codepages)."<br>
<br>
For example in Latin-9 (ISO 8895-15), Euro is at 164.<br>
In IBM CodePage 850 (or, 858, to be precise), Euro replaced dotless i at 213.<br>
Mac Roman replaced the generic currency sign and put Euro at 219,<br>
(all "extended ascii")<br>
<br>
To complete the list, Unicode assigned CodePoint U+20AC for Euro.<br>
<br>
It's hard to get your Euro's worth… :D<br>
<br>
<br>
Best regards<br>
        -Tobias<br>
<div><div class="h5"><br>
> <br>
> <a href="https://www.petefreitag.com/cheatsheets/ascii-codes/" rel="noreferrer" target="_blank">https://www.petefreitag.com/<wbr>cheatsheets/ascii-codes/</a><br>
> <br>
> Thanks for the explanation!  It makes sense that it would have been a hack for code printing.  <br>
> <br>
> All the best,<br>
> <br>
> Ron Teitelbaum<br>
> <br>
> On Mon, Jul 2, 2018 at 2:26 PM, Tobias Pape <<a href="mailto:Das.Linux@gmx.de">Das.Linux@gmx.de</a>> wrote:<br>
> Hi all<br>
> <br>
>> On 02.07.2018, at 19:29, Ron Teitelbaum <<a href="mailto:ron@usmedrec.com">ron@usmedrec.com</a>> wrote:<br>
>> <br>
>> That is strange.<br>
>> <br>
>> On Squeak 4.1 <br>
>> <br>
>> $^ charCode -> 94<br>
>> 94 asCharacter -> $^<br>
>> 128 asCharacter -> $€ charCode -> 128  (doesn't show properly in text on email but does in squeak, see image).<br>
>> <br>
>> <Capture.PNG><br>
>> <br>
>> In other words, if I use my keyboard to type it in, it seems to be represented fine and it evaluates to charCode 94 as expected.<br>
>> <br>
>> But something created with 128 charCode also is represented with the same symbol and it also retains it's 128 charCode as you can see with you send charCode to the string representation that was created.<br>
>> <br>
>> If this was filed out it would seem that either version could have been used in the code and you wouldn't notice it.  Manually changing it by typing in ^ and fileing it out again will probably fix it.  An external editor changing 128 to 94 chars will also probably work.<br>
>> <br>
>> All the best,<br>
> <br>
> Maybe I can shed a bit light on things here. <br>
> <br>
> If you look at the attached image (which is one of the default fonts we use), you see that ^ and _ are present after [\] but ALSO after {|}~. This seems to be intentional so that you, should you want, can switch betwen caret/underscore and up-arrow/left-arrow printing for return/assignment and here's how it's done:<br>
> <br>
> StrikeFont>>useLeftArrow<br>
>       self characterToGlyphMap.<br>
>       characterToGlyphMap at: 96 put: 95.<br>
>       characterToGlyphMap at: 95 put: 94<br>
> <br>
> and<br>
> <br>
> StrikeFont>>useUnderscore<br>
>       self characterToGlyphMap.<br>
>       characterToGlyphMap at: 96 put: 129.<br>
>       characterToGlyphMap at: 95 put: 128<br>
> <br>
> <br>
> There's the 128.<br>
> <br>
> What happens here, too, is that 128 is no proper character to begin with.<br>
> <br>
> Our characters represent unicode codepoints, which, for ByteStrings, happen to _exactly_ match the ISO 8859-1 (Latin1) encoding. (In fact, that was a design decision for Unicode to begins with; does NOT hold for UTF-8 tho).<br>
> <br>
> In both, Unicode and ISO 8859-1, certain "character codes" are not actually characters. The control characters (<32) are intentionally undefined, as are codes between 128 and 159 (includes 128). However, 8859-1 was often combined with Ansi escape codes (aka ISO 6429), which defines the codes from 128 as Control Block C1, which Unicode subsequently adopted.<br>
> <br>
> Long story short, Characters between 128 and 159 are inherently non-printable. Either they control output or format output, but cannot in themselves be displayed. The StrikeFonts utilize that and use those code points in fonts to relocate caret, underscore, left-arrow and right-arrow so that they can serve as substitutes when you don't want ^ _ in code but rather arrows.<br>
> <br>
> =-=-=-=-=<br>
> <br>
> That being said, I just saw that the fileList forces MacRoman encoding (deprecated since MacOS X 10.0 in 2001....) which _has_ a proper meaning for 128, namely Ä. However, the respective method probably needs an overhaul:<br>
> <br>
> FileList>>defaultEncoderFor: aFileName<br>
> <br>
>       "This method just illustrates the stupidest possible implementation of encoder selection."<br>
>       | l |<br>
>       l := aFileName asLowercase.<br>
> "     ((l endsWith: FileStream multiCs) or: [<br>
>               l endsWith: FileStream multiSt]) ifTrue: [<br>
>               ^ UTF8TextConverter new.<br>
>       ].<br>
> "<br>
>       ((l endsWith: FileStream cs) or: [<br>
>               l endsWith: FileStream st]) ifTrue: [<br>
>               ^ MacRomanTextConverter new.<br>
>       ].<br>
> <br>
>       ^ Latin1TextConverter new.<br>
> <br>
> =-=-=-=-=-=<br>
> <br>
> Indeed, the file x.cs contains an 128 at the indicated position. Which is in the middle of a binary SmartRefStream-dump. Maybe we must change the fileIn logic to make the stream binary when it encounters a smartrefstream? that would certainly help. <br>
> <br>
> Best regards<br>
>       -Tobias<br>
> <br>
> <br>
> <br>
</div></div>> <dejavu_new.png><br>
<div class="HOEnZb"><div class="h5">>> <br>
>> Ron Teitelbaum<br>
>> <br>
>> <br>
>> On Mon, Jul 2, 2018 at 12:23 PM, Eliot Miranda <<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>> wrote:<br>
>>  <br>
>> Hi Subbu,<br>
>> <br>
>> > On Jul 2, 2018, at 7:24 AM, K K Subbu <<a href="mailto:kksubbu.ml@gmail.com">kksubbu.ml@gmail.com</a>> wrote:<br>
>> > <br>
>> > Hi,<br>
>> > <br>
>> > I need help in tracing a bug (see attached picture) which triggered a MNU while trying to view a .cs file in FileTool. I traced the problem to peek on aStream returning a nil because a wrong character code was being returned in generated.<br>
>> > <br>
>> > In the attached picture, aStream isBinary is false and the basicNext returns the correct $^ character which gets stored in character1 local var. But an inspector displays it as Character 128. In the same inspector window $^ shows the correct character code as 94.<br>
>> > <br>
>> > This is on Squeak5.2alpha-64b-Linux-<wbr>18127. What is happening here?<br>
>> <br>
>> No idea.  Do you have a test case?<br>
>> <br>
>> > Has anyone seen this type of behavior before?<br>
>> > <br>
>> > <br>
>> > Thanks in advance .. Subbu<br>
>> > <strangeCharBug.png><br>
>> <br>
> <br>
> <br>
<br>
<br>
</div></div></blockquote></div><br></div>