MATLAB: Weired behaviour after upgrade to Mojave

mojavepath

After upgrading to Mojave Matlab started acting strange.
The two following pairs of lines are equivalent:
1)
path = '‎/Users/gtrumpy/';
values = importdata([path 'Desktop/test.txt']);
2)
path = '/Users/gtrumpy/Desktop/';
values = importdata([path 'test.txt']);
The first give me an error (Error using importdata (line 137). Unable to open file.), while the second works fine.
I'm puzzled.
Is anybody encountering a similar problem?

Best Answer

Turns out that there is an ivisible unicode character just at the very beginning of path.
You can copy paste the line into a text editor, and when you cursor your way through the line, you'll notice that you have to push the arrow twice. Just delete that unicode character and you should be good to go.