2

I have problems with command 'load'. For example my script is something like this:

set xlabel ‘blabla’

But when i try to load this, I get:

load '/Users/.../gnuplot.txt'
                 ^
     "/Users/.../gnuplot.txt", line 1: invalid character ?

I figured out that adding "reset" before the whole script change the error message:

set xlabel ‘blabla’
                 ^
     "/Users/.../gnuplot.txt", line 2: invalid character ?

But when I write everithing into the terminal by myself, I get no errors...

Any idea how to fix it??

Thanks

2 Answers 2

2

You are using the wrong quotation marks (Left and Right single quotation marks, codepoints U+2018 and U+2019).

You must use ASCII single or double quotation marks, either ' (0x27) or " (0x22).

Sign up to request clarification or add additional context in comments.

1 Comment

Yes, this was the problem! I used Plain Text Editor instead of TextEdit and suddenly everything works fine! Thanks a lot :)
0

Try putting this line before your load command

set encoding utf8

The invalid character smacks of using the wrong character set.

2 Comments

I tried what you've suggested but unfortunately, results are still same... But thanks for your effort :)
It looks like you have invalid characters in your file gnuplot.txt. Try running cat -vet gnuplot.txt and looking for anything weird. Click edit under your question and paste the output of the command above.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.