How can I insert non-printing special characters in component and Tag/Layer names?

I would like to be able to insert a character into tag and component definition names, to force names starting with or including that character to sort before the space character.

I use Mac OS X (either Mojave or Big Sur), not Windows.

It may not be possible, and I can live with that if I have to. But if if IS possible, I’d like to know how to.

I’ve done a general google search, but the main things I found were years old, and I can’t get the suggested shortcuts to work.

I’ve enable the Unicode input source in System Prefences/Keyboard Input sources, but don’t understand the shortcut.
image

What does the ^ (caret) character mean? As a text character, that is Shift 6 on my British keyboard.

Or is it just the Shift key?

  1. Does SU use UTF8 characters either everywhere or at least in component and tag/layer names? (In particular, in SU 2020 or 2021, but useful to know for earlier versions back to 2017.)
  2. If not, what does it use? Code pages, depending on language? If so, what code page is used for UK and/or Canadian English?
  3. If it DOES use UTF8, how do I insert a non-printing character into the name, from the keyboard? I’d particularly like to use the zero width space, Unicode character U+200B.
  4. If it uses the variants of ASCII with code pages, how can I insert (also from the keyboard) a non-printing character that sorts before space (ASCII character 32) and preferably doesn’t occupy space?

If it isn’t possible from the keyboard, can I generate the character somewhere else, then copy and paste it into place?

[LATER] I find I can enable Unicode input using an icon on the menu bar.

Trying again, I hold down Option and type a four digit number - that seems to work, at least for printable characters.

But I can’t enter a non-printing character in a Tag name. It just inputs four separate characters.
Nor can I cut and paste a letter followed by a Unicode Null - U+0000, and equally U+200B doesn’t work either.

Either character seems to act as a line feed, and anything I input after that goes onto a second line in the Tag name which I can only see if I scroll down with the Down arrow.

So maybe it isn’t possible?

Maybe a workaround is to start the tag I want first with letter + space then successive tags with letter + hyphen or underscore. Both hyphen and underscore sort after space.

The ⌃ glyph usually denotes the control key, Shift is the fat upward arrow ⇧.

These are Unicode or UTF-8 characters available in the Technical Symbols set on Mac. If in System Preferences-> Keyboard->Keyboard tab you enable “Show keyboard and emoji viewers in menu bar” you can right click the keyboard item in the bar, select show Emojis and Symbols, pick the desired set and then drag glyphs out of the viewer window onto an input area. For example, that’s how I got these:

⌘⇧⌥⌃

The main gotcha is that not all destinations will accept the drag and drop. For example, I can drag these characters into a component name during the create component dialog, but not into Entity Info’s Instance Name or Definition Name because the field is deselected when I try to select a character from the viewer. The tedious workaround is that if you right-click the character in the viewer, you get a choice to “copy character info”. That puts the glyph, its name, and its coding info onto the copy buffer. - e.g.

UPWARDS WHITE ARROW
Unicode: U+21E7, UTF-8: E2 87 A7
If you paste that into an editor that handles UTF-8, you can delete all but the glyph and then cut and paste it into somewhere else.

DOH. Of course it does. Just so long that I last saw that, I’d forgotten.

While you were typing, Steve, I was trying things in TextEdit, and trying to copy to the Tag name. It just won’t properly use the non-printing characters, and turns them into line feeds.

as far as ASCII (or other) characters lower than space - many of those are mostly leftover from the days of teletype and compatible equipment, thus are control characters (hence “unprintable”).

perhaps a better solution is to eliminate the use of “space” as a character in the names of things. i typically use an underscore, and where not permissible, a hyphen. for sorting i like numbers: 0000-9999 provides a lot of options.

a leading underscore for “hidden” things (easy to filter) example “_some_name” or even double “__hidden_thing” where these are sub components or groups i want to filter from lists. but main components might be “000-doors” or “0000-bracket_some_name” “300-bolt_name_size” etc…

the downside to those names is they enforce a particular sort ordering in the names which may conflict with how the consumer (if other than yourself) might choose to sort things - so attributes with sort information embedded may be the better part of valor in this regard. then in reports - use the attribute for sorting and grouping rather than the name.