|
From: Ethan A M. <merritt@u.washington.edu> - 2005-11-13 19:49:51
|
Nevertheless, so far as I can tell from testing, versions 3.7, 4.0, and 4.1 all behave the same way. Why is it suddenly a bug now, but not for the past 10 years? On Sunday 13 November 2005 11:04 am, Petr Mikulik wrote: > >> Can be reproduced in this way: > >> > >> gnuplot> set title 'c:\' > >> gnuplot> show title > >> > >> title is "c:\\'", offset at ((character units) 0, 0, 0) > >> It seems routine try_to_get_string() returns one superfluous ' > >> more. > > > > It has nothing to do with try_to_get_string(). > > The behaviour has been there since at least version 3.7 > > Backslash is an escape character, and you have escaped the trailing > > single quote. This forces it to be kept in the string. > > What you need to do is to escape the backslash itself, > > and use double quotes: > > \ is an escape character in quotes " only, not in ' > > See: > > gnuplot> set title 'c:\tmp' > gnuplot> show title > > title is "c:\\tmp", offset at ((character units) 0, 0, 0) > > gnuplot> set title 'c:\' > gnuplot> show title > > title is "c:\\'", offset at ((character units) 0, 0, 0) > > > In the bug report example, gnuplot mistakenly adds an ' > > > Does the original problem persist if you use double quotes? > > > > Can you use the cygwin syntax (forward slash) instead? > > cd "c:/" > > This works. > > --- > PM -- Ethan A Merritt Biomolecular Structure Center University of Washington, Seattle 98195-7742 |