<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">I’m not in any position to provide authority for anything, but I’m interested in learning more about what you’re doing. <div class="">I’d like to know more about Unicode in Squeak, so if you post more on the topic, perhaps some examples, you can be sure I’ll be reading them. </div><div class=""><br class=""></div><div class="">Chris <br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Mar 17, 2020, at 6:51 PM, Thiede, Christoph <<a href="mailto:Christoph.Thiede@student.hpi.uni-potsdam.de" class="">Christoph.Thiede@student.hpi.uni-potsdam.de</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div id="divtagdefaultwrapper" dir="ltr" style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-size: 12pt; font-family: Calibri, Helvetica, sans-serif;" class=""><div style="margin-top: 0px; margin-bottom: 0px;" class="">Hi all! :-)</div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></div><div style="margin-top: 0px; margin-bottom: 0px;" class="">After some recent fun with the Unicode class, I found out that its data is quite out of date (for example, the comments do not even "know" that code points can be longer than 4 bytes. Younger characters such as 😺❤🤓 are not categorized correctly, etc. ...). Luckily, there is already some logic to fetch the latest data from <a href="http://www.unicode.org/" class="OWAAutoLink" id="LPlnk135036" previewremoved="true">www.unicode.org</a>. I'm currently reworking this logic because it's not completely automated yet and has some slips, but so long, I have one general question for you:</div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></div><div style="margin-top: 0px; margin-bottom: 0px;" class="">At the moment, we have 30 class variables each for one Unicode category number. These class vars map in alphabetical order to the integers from 0 to: 29. Is this tedious structure really necessary? For different purposes, I would like to get the category name of a specific code point from a client. The current design makes this impossible without writing additional mappings.</div><div style="margin-top: 0px; margin-bottom: 0px;" class="">Tl;dr: I would like to propose to drop these class variables and use Symbols instead. They are comparable like integers, and as they are flyweights, this should not be a performance issue either. Of course, #<span class="">generalCategoryOf: will have to keep returning numbers, but we could deprecate it and use a new #generalTagOf: in the future. Furthermore, this would also allow us to deal with later added category names (though I don't know whether this will ever happen).</span></div><div id="Signature" class=""><div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" class=""><div name="divtagdefaultwrapper" style="font-family: Calibri, Arial, Helvetica, sans-serif; margin: 0px;" class=""><div class=""><div class="_rp_T4" id="Item.MessagePartBody"><div class="ms-font-color-neutralDark ms-font-weight-regular rpHighlightBodyClass rpHighlightAllClass _rp_U4" id="Item.MessageUniqueBody" style="font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif, serif, EmojiFont;"><div dir="ltr" class=""><div id="divtagdefaultwrapper" class=""><font face="Calibri,Helvetica,sans-serif,EmojiFont,Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Segoe UI Symbol,Android Emoji,EmojiSymbols" class=""><div id="Signature" class=""><div style="margin: 0px;" class=""><font style="font-family: Calibri, Arial, Helvetica, sans-serif, serif, EmojiFont;" class=""></font></div></div></font></div></div></div></div><div class="_rp_T4" id="Item.MessagePartBody"><br class=""></div><div class="_rp_T4" id="Item.MessagePartBody">Examples:</div></div></div></div></div><blockquote style="margin: 0px 0px 0px 40px; border: none; padding: 0px;" class=""><div class=""><div dir="ltr" style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" class=""><div name="divtagdefaultwrapper" style="font-family: Calibri, Arial, Helvetica, sans-serif; margin: 0px;" class=""><div class=""><div class="_rp_T4" id="Item.MessagePartBody"><span class="">Unicode generalTagOf: $a asUnicode. "#Ll"</span></div></div></div></div></div><div class=""><div dir="ltr" style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" class=""><div name="divtagdefaultwrapper" style="font-family: Calibri, Arial, Helvetica, sans-serif; margin: 0px;" class=""><div class=""><div class="_rp_T4" id="Item.MessagePartBody"><span class=""><br class=""></span></div></div></div></div></div><div class=""><div dir="ltr" style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" class=""><div name="divtagdefaultwrapper" style="font-family: Calibri, Arial, Helvetica, sans-serif; margin: 0px;" class=""><div class=""><div class="_rp_T4" id="Item.MessagePartBody"><div class="">Unicode class >> isLetterCode: charCode</div></div></div></div></div></div><div class=""><div dir="ltr" style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" class=""><div name="divtagdefaultwrapper" style="font-family: Calibri, Arial, Helvetica, sans-serif; margin: 0px;" class=""><div class=""><div class="_rp_T4" id="Item.MessagePartBody"><div class=""><span style="font-size: 12pt; white-space: pre;" class="">  ^ (</span><span style="font-size: 12pt;" class="">self generalTagOf: charCode) first = $L</span></div></div></div></div></div></div><div class=""><div dir="ltr" style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" class=""><div name="divtagdefaultwrapper" style="font-family: Calibri, Arial, Helvetica, sans-serif; margin: 0px;" class=""><div class=""><div class="_rp_T4" id="Item.MessagePartBody"><br class=""></div></div></div></div></div><div class=""><div dir="ltr" style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" class=""><div name="divtagdefaultwrapper" style="font-family: Calibri, Arial, Helvetica, sans-serif; margin: 0px;" class=""><div class=""><div class="_rp_T4" id="Item.MessagePartBody"><div class="">Unicode class >> isAlphaNumericCode: charCode</div></div></div></div></div></div><div class=""><div dir="ltr" style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" class=""><div name="divtagdefaultwrapper" style="font-family: Calibri, Arial, Helvetica, sans-serif; margin: 0px;" class=""><div class=""><div class="_rp_T4" id="Item.MessagePartBody"><div class=""><span style="white-space: pre;" class="">  </span>| tag|</div></div></div></div></div></div><div class=""><div dir="ltr" style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" class=""><div name="divtagdefaultwrapper" style="font-family: Calibri, Arial, Helvetica, sans-serif; margin: 0px;" class=""><div class=""><div class="_rp_T4" id="Item.MessagePartBody"><div class=""><span style="white-space: pre;" class="">  ^ (</span>tag := self generalCategoryOf: charCode<span style="font-size: 12pt;" class="">) first = $L</span></div><div class=""><span style="font-size: 12pt;" class="">        or: [tag</span><span style="font-size: 12pt;" class=""> = #Nd]</span></div></div></div></div></div></div></blockquote><div class=""><div dir="ltr" style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" class=""><div name="divtagdefaultwrapper" style="font-family: Calibri, Arial, Helvetica, sans-serif; margin: 0px;" class=""><div class=""><div class="_rp_T4" id="Item.MessagePartBody"><div class=""></div></div></div></div></div></div><div class=""><div dir="ltr" style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" class=""><div name="divtagdefaultwrapper" style="font-family: Calibri, Arial, Helvetica, sans-serif; margin: 0px;" class=""><div class=""><div class="_rp_T4" id="Item.MessagePartBody"><div class=""><br class=""></div>How do you think about this proposal? Please let me know and I will go ahead! :D</div><div class="_rp_T4" id="Item.MessagePartBody"><br class=""></div><div class="_rp_T4" id="Item.MessagePartBody">Best,</div><div class="_rp_T4" id="Item.MessagePartBody">Christoph</div></div></div></div></div></div></div></blockquote></div><br class=""></div></body></html>