Unicode symbols

Unicode symbols

john.uhden
Mentor Mentor
6,988 Views
10 Replies
Message 1 of 11

Unicode symbols

john.uhden
Mentor
Mentor

Why is it that unicode symbols show up in a textstring property as a "?"?

For example, the capital delta character is U+0394, but "\\U+0394" doesn't show up, just "?" instead.

BTW, the simplex font supports such characters, so the text/mtext looks correct.

And it seems you can't edit the textstring to add a unicode character, but you can change it via (vlax-put 'Textstring blahblah).

John F. Uhden

0 Likes
6,989 Views
10 Replies
Replies (10)
Message 2 of 11

dbroad
Mentor
Mentor

Have you tried with TTF's that support the specific unicode symbols?  SHX fonts predate unicode I believe.

Architect, Registered NC, VA, SC, & GA.
0 Likes
Message 3 of 11

Kent1Cooper
Consultant
Consultant

@john.uhden wrote:

....

BTW, the simplex font supports such characters, so the text/mtext looks correct.

....


The capital-Delta character also works in ROMANS and COMPLEX and the GREEK ones, but [in a quick spin-through] not in others that come with AutoCAD [TXT, ROMAND, ROMANC, the ITALIC ones, etc.].  So it seems decidedly specific-font-related.

Kent Cooper, AIA
0 Likes
Message 4 of 11

dbroad
Mentor
Mentor

Using the arial font, I can type-in \U+0394 and get a delta in both single line text and mtext both when entering it the first time and when editing the text.  In the mtext editor, I can also use the symbols drop down to plop it in.  I can also use charmap.

One problem with the alt codes is that, unless you're a pretty fast typist, it switches focus to the ribbon for alt picking. Another problem is that the ALT 916 that references say represents capital delta doesn't work (at least with Arial).

Architect, Registered NC, VA, SC, & GA.
0 Likes
Message 5 of 11

john.uhden
Mentor
Mentor
Doug,
SIMPLEX.SHX has supported unicode as far back as when I first started
writing AutoLisp. That's not the issue. The textual objects come out
looking just fine. But the properties and entity data show only a "?"

Wait a second. The delta character does show up when exploding a C3D
segment label of an arc (simplex font). OMG, and it shows up in the text
editor.
Looky here... I've even copied it into this message. Δ But when I look at
the mtext properties again it has turned into a "?"

I am using C3D 2020.

I swear I've had nothing to drink since dinner last night.

John F. Uhden

0 Likes
Message 6 of 11

john.uhden
Mentor
Mentor
I thought the Alt codes went up to only 255.
Sorry, but we use Arial pretty much only for mtext or table headers,
certainly not for bearings and distances and arc data.

John F. Uhden

0 Likes
Message 7 of 11

dbroad
Mentor
Mentor

I use TTF fonts exclusively since they are searchable in PDFs that I send to clients. I dumped shx fonts because they weren't supported by PDF except through workarounds that make them lots more complicated.

 

The delta does work fine in the simplex.shx font.  The delta is readable also in the properties palette.

 

Alt codes seem to go much higher than 255 but ALT 961 doesn't do anything.  Alt 172 and Alt 940 create the same character so it could be overflowing.

 

(rem 940 256) -> 172 

 

Could be a limitation of AutoCAD because ALT tables online go higher.

Architect, Registered NC, VA, SC, & GA.
0 Likes
Message 8 of 11

Kent1Cooper
Consultant
Consultant

@john.uhden wrote:
.... The textual objects come out
looking just fine. But the properties and entity data show only a "?"

.... The delta character does show up when exploding a C3D
segment label of an arc (simplex font). OMG, and it shows up in the text
editor.
.... Δ But when I look atthe mtext properties again it has turned into a "?"
....

Using a Style with Arial font, I get [Acad2019] on-screen:

Kent1Cooper_1-1627404686361.png

Propeties:

Kent1Cooper_2-1627404736235.png

Entity Data:

Kent1Cooper_0-1627404654361.png

 

When I change that Style to use SIMPLEX.shx, all is the same except for the on-screen look of the other text characters.  When I change it to use TXT.shx, and put a Delta symbol into Mtext from the Symbols pull-down, the Delta character still appears on-screen, but in Properties and Entity Data it is replaced by:
{\\fISOCPEUR|b0|i0|c0|p34;Δ}

If I then EXPLODE that Mtext, it breaks the rest of it into separate Text objects around the Deltas, and creates a whole new Style called "MtXpl_ISOCPEUR" to accommodate the Delta characters as separate Text objects.

Kent Cooper, AIA
0 Likes
Message 9 of 11

john.uhden
Mentor
Mentor
That is VERY interesting and educational, Doug.
I guess I never think about copying/pasting text from an AutoCAD PDF. I
just care that they are legible.
But, no, the delta does NOT always show up in the properties palette and
even the mtext editor. Though sometimes it will.
I figure that if I want to search a whole set of plans for a word, like
"remove", that I hafta create a DWF to do it. That DWF find saved my @$$
more than once... Had a demolition plan and not once had I said to remove
all spoils from the site. It's a good thing I caught it lest the VA
medical facility was left with piles of shale and other stuff all over the
campus.

John F. Uhden

0 Likes
Message 10 of 11

dbroad
Mentor
Mentor

Being able to copy/paste from pdf is very helpful.  Searching is key though. I really appreciate the architects who provide searchable pdfs.  Several examples:

1.  A project with hundreds or thousands of rooms:  Being able to zoom to a single room by entering the room number or name in a search bar.

2.  For civil work, finding a single property line in a subdivision by curve number, bearing angle, or distance or a single tract by number or owner.

3.  For finish work, finding a single mark number in an unalphabetically organized finish schedule with hundreds of finishes.

4.  If the entire set is in a single file, being able to find every reference of a product or labeled item.

 

@Anonymous Thanks for the illustrations.  Looks like mtext is using font substitution when the txt.shx font is used to maintain support.  That's very smart of AutoCAD developers.

Architect, Registered NC, VA, SC, & GA.
0 Likes
Message 11 of 11

john.uhden
Mentor
Mentor

Well, that's all nice, but the forum master is prodding me to accept a solution, and as yet I don't have one (as to why sometimes delata and sometimes "?")

So if someone tells me it's just an unexplained anomaly, I will accept that as a solution.

Meanwhile, many thanks to all who have chipped in with their knowledge; it helps me to keep learning.

John F. Uhden

0 Likes