Double quotes are the wrong ascii code when you copy from site and paste in Win7 FIJI

I had to change all the double quotes when I copied code from:

Ron DeSpain

Hello Ron -

I believe that this is a consequence of browsers and / or the
forum trying to be “helpful” and make things look slicker. This
can be avoided by putting text your want to copy-paste verbatim
in code or text back-tick quotes.

Compare:

Unadorned text:

print (“Howdy”);

Single back-tick quotes:

print ("Howdy");

Triple back-tick IJM (java) block:

print ("Howdy");

Triple back-tick text block:

print ("Howdy");

When I copy-paste the “unadorned” text from the forum, I get
the fancy “bad” quotes. But when I copy-paste from any of the
three back-tick versions I get the good quotes.

Thanks, mm

4 Likes

Yo Mountain_man
Is there a way to get the word to the forum to not change code quotes pasted from the ImageJ editor to fancy ones. This makes it impossible to share code with newbies seeking help, as when they copy the code and run it, it crashes for reasons that they will probably not understand and they will probably give up. The capability to upload and attach macros ( *.ijm’s) would also solve this problem.

(“Howdy”)>image > image
(“Howdy”) > image > image

I also notice here that the spaces I typed around the greater than signs didn’t get into this message. This could disable the parsing of text strings concatenated with variables, though I don’t have an example…

Thanks
Ron DeSpain

Hello Ron -

I understand your issue but I think the back-tick quotes I gave
examples of in my previous reply offer a satisfactory solution.

When I copy-paste the back-ticked "Howdy"s from my previous
reply I get ordinary ascii double quotes rather than “fancy” quotes.

Just to be clear, let me put some back-tick quoted text in a triple
back-tick text block so you can see the back ticks in the forum:

Here is a single-back-tick quoted
   `"Howdy"`
with regular ascii double quotes.

Doesn’t this work for you?

Thanks, mm

mm
When I copied your first example ImageJ failed at the curley quotes line. Since I help many users who aren’t very good coders, I think that when they download code I paste in that gets " 's replaced by curley quotes I’m sure that they are frustrated. This seems to go against the Forums implied goal of being a place for users to go for help.

Ron DeSpain

Hello Ron -

If by my “first example” you mean the first occurrence of

   print (“Howdy”);

(labeled “Unadorned text”), then you got the expected result of getting
curly quotes. See my comment from above:

If you got curly quotes copy-pasting any of the subsequent three
instances of

   print ("Howdy");

then there is a real issue. If you do have this issue, could you please
tell us what browser you are using, the details of how you copy-paste,
and the tool you use to distinguish between plain-ascii and curly quotes?

The code in your post that you linked to in your original post in this
thread was not enclosed in a triple-back-tick code block. So, yes,
copy-pasting such code would give curly quotes, wouldn’t work
(without editing) as code, and would frustrate beginners.

The standard forum-supported way to avoid this issue is to enclose
short code fragments in single back-tick quotes, and multi-line code
chunks in triple-back-tick code blocks.

As an experiment, perhaps you could go back and edit the post you
linked to to wrap your code in a triple-back-tick code block (being
sure, if necessary, to edit the code afterwards to change any curly
quotes back to plain quotes). That should fix the problem. But if it is
still broken for you, the rest of us could try it ourselves – copy-pasting
from the forum itself – and work to resolve the issue.

Thanks, mm

1 Like

Thanks for your time.

Ron DeSpain