A possible bug with text


#1

I am trying to add some text to a model. The text to create is “You & Me, Always” (without the quotes). Text height 4 mm, text thickness 0.5 mm. Solids

I enter the text into the text box. When I click OK, and place the text it says: “You & Me Alwayse,”. (no quotes)

At the end the e and comma are added. Removing the extra letter and comma is not difficult.

However, is this a bug?


#2

Yes, there are some known bugs with TextObject currently, including it’s adding of extra unwanted characters…

–Mitch


(Dan Belcher) #3

This is still on our list (MR-1045). Perhaps most odd is that it seems to insert different “extra characters” each time the TextObject command is run (even using the same strings).


#4

Possible hint here… It may have something to do with text encodings. Internally if created as such strings are supposed to remain UTF-8 regardless of operations, however in my cocoa development work (utterly unrelated, this was a serial communications app), I’d found that the encoding would occasionally change under the hood for no explicable reason, leading to having characters appended to strings. This would show up on transferring hardware buffer contents of the port to child properties of the class, doing binary mid / left / right string operations, etc. My guess is the OS X string class api’s themselves are glitchy. The only reliable solution I’ve found has been to force the text encoding prior to each write and after each read from any string variable in order to ensure it didn’t change internally as a result of the call.


(Dan Belcher) #5

That’s an astute hint. I’m so paranoid about character encoding…it’s always my mental go-to when it comes to this sort of thing. I am a big fan of reading (and re-reading) this article once (or twice) a year. Thanks for reminding me. It could be a problem with encoding, but I don’t really think that is what is going on in this case…but I would NOT be shocked if it was.

My guess is the OS X string class api’s themselves are glitchy.

This part I fully suspect you are right about…now for more digging.


#6

Oh yeah. The Joel rant on Unicode. “Six months peeling onions in a submarine”. Used that quote at the office more times than I can count in reference to certain programmers at a fruit flavored computer manufacturer.

I’ve often thought if Joel ran the world we’d be in far better shape.