Numbers is changing string constants on its own!

curmudgeonette

macrumors 6502a
Original poster
Jan 28, 2016
553
406
California
I'm using Apple Numbers to compile raw data into a markup language. I've discovered that Numbers is changing certain characters in string constants in my formulas when I go to edit them. I needed to change

=CONCATENATE("<!--the answer is 42-->")

into

=CONCATENATE("<!--the answer is ",G1,"-->")

After editing the formula, I discovered it is now:

=CONCATENATE("<!––the answer is ",G1,"––>")

This looks almost the same, but the minus signs have been changed into en-dashes! As I'm generating essentially program code, this won't work. Grrr!!! :mad:

It looks like the change happens when the formula is brought into the editing window. It also looks like strings shorter than some length stay unchanged. So I have a workaround of coding each dash as a single character string:

=CONCATENATE("<!","-","-","the answer is ",G1,"-","-",">")

BTW, I also observed a "/" in a longer string get changed into a divide sign.
 

AppleSmack

macrumors regular
Jun 30, 2010
195
55
Have a look in system preferences > keyboard > auto correct

There might be an option that turns two hyphens into a long dash - typographically correct, but no good for spreadsheets!
 

curmudgeonette

macrumors 6502a
Original poster
Jan 28, 2016
553
406
California
Have a look in system preferences > keyboard > auto correct

There might be an option that turns two hyphens into a long dash
I have everything like that turned off. No substitutions, no smart quotes, nothing!

Besides, the problem doesn't happen when typing. I can type in what I want and it will take it just fine. The formula will be working correctly for a long time. But when I double click to edit the formula, it gets changed on me.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.