[Cuis-dev] [Ann] Unicode support in TextEditors, Files and Smalltalk code

Juan Vuletich juan at cuis.st
Sat Aug 6 07:21:06 PDT 2022


Hi Luciano,

On 8/6/2022 5:00 AM, Luciano Notarfrancesco via Cuis-dev wrote:
> Hi Juan,
> I started using UTF-8 in my math project. I was surprised that I 
> didn’t have to search and replace the special characters that we were 
> using before Unicode support… I just filed-in my packages and then 
> filed-out as UTF-8 without doing anything special. Tests pass, 
> everything seems to be working fine. Thank you!

Nice to know! BTW, you're using World / Preferences / Use Unicode text, 
right?

> One minor problem that I ran into is that now we cannot concatenate 
> strings with Text. In some printOns I was doing something like ‘ζ’, 
> ‘0’ sub but now I have to do ‘ζ’ asText, ‘0’ sub. Not sure if this 
> change was intentional, but it is reasonable to me, no need to “fix” it.

We're in sync! I went on to play with this stuff on Thursday and found 
this bug. Pushed the fix yesterday.

> Also, look at the method Character>>#namedCharactersTable. Why is that 
> the arrows are shown as null glyphs? I’ll later update this method 
> with all Greek letters and some other useful symbols.

Yes. When I did the auto convertion of invalid UTF-8 (i.e. non-ascii 
Characters) I forgot about the arrows (they are in the valid ASCII 
range: 28, 29, 30, 31). Just pushed a fix for them.

BTW, this also makes me thing that the extended-ascii Characters are no 
longer needed, and they add unneeded complexity. When we move Cuis to 
use UTF-8 by default, we could make String and Character be only pure 
ascii (using just 7 bits). This will make conversions easier and faster. 
In a couple of months, I guess.

Thanks for using this! Please report any bugs or annoyances you see, so 
we can keep polishing it.

Oh, one detail to keep in mind: Given that by default Cuis still uses 
the 8 bit encoding in code files, any changes to #namedCharactersTable 
or similar can not be added to the update stream and the base image yet. 
A good reason to migrate everything to UTF-8.

Cheers,

>
> Thanks!
> Luciano
>
> On Fri, 8 Jul 2022 at 02:56 Juan Vuletich via Cuis-dev 
> <cuis-dev at lists.cuis.st <mailto:cuis-dev at lists.cuis.st>> wrote:
>
>     Hi Folks,
>
>     I've just pushed the updates needed to enable UTF-8 Unicode in
>     editors,
>     files and source code. This means that letters in any alphabet can be
>     used in identifiers (variable and class names, selectors), literals,
>     etc. Additionally, any math symbol in Unicode can be used in binary
>     selectors.
>
>     Updating your image should not involve risk, as it is not
>     activated by
>     default. This means that editors still edit String using
>     Character, and
>     code is saved in StandardFileStream.
>
>     But the new code is very new, and hasn't been used for long. So,
>     please
>     play with it in throw-away images, where losing stuff is not a
>     problem.
>     To activate it, evaluate `TextModel useUtf8Editors`.
>
>     Please share your experience, and report any bugs or problems you
>     find.
>
>     Enjoy!
>
>     -- 
>     Juan Vuletich
>     www.cuis-smalltalk.org <http://www.cuis-smalltalk.org>
>     https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev
>     https://github.com/jvuletich
>     https://www.linkedin.com/in/juan-vuletich-75611b3
>     https://independent.academia.edu/JuanVuletich
>     https://www.researchgate.net/profile/Juan-Vuletich
>     https://patents.justia.com/inventor/juan-manuel-vuletich
>     https://twitter.com/JuanVuletich
>
>     -- 
>     Cuis-dev mailing list
>     Cuis-dev at lists.cuis.st <mailto:Cuis-dev at lists.cuis.st>
>     https://lists.cuis.st/mailman/listinfo/cuis-dev
>


-- 
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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20220806/861918ff/attachment.htm>


More information about the Cuis-dev mailing list