lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Use our own ~s ly:format placeholder, since guile is broken with wid


From: Joe Neeman
Subject: Re: Use our own ~s ly:format placeholder, since guile is broken with wide chars
Date: Sat, 22 Aug 2009 15:59:55 -0700

On Sat, 2009-08-22 at 13:01 +0200, Reinhold Kainhofer wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Am Samstag, 22. August 2009 02:28:39 schrieb address@hidden:
> > On 2009/08/22 00:11:34, Reinhold wrote:
> > > http://codereview.appspot.com/109070/diff/1/2
> > > File lily/general-scheme.cc (right):
> > >
> > > http://codereview.appspot.com/109070/diff/1/2#newcode437
> > > Line 437: replace_all (&s, "\"", "\\\"");
> > >
> > > On 2009/08/21 22:59:33, joeneeman wrote:
> > > > Don't forget to escape $. Or else use single quotes rather than
> >
> > double quotes.
> >
> > > Good catch. $ needs to be escaped, too. Using single quotes does not
> >
> > work with
> >
> > > gs.
> >
> > Well, it should be the shell that sees the quotes, not gs. Perhaps
> > you're using cmd.exe and it doesn't like single quotes? 
> 
> I'm using bash on Linux, and that doesn't like single quotes. in particular, 
> the following command does NOT work:
> gs -q -dSAFER -dDEVICEWIDTHPOINTS=595.28 -dDEVICEHEIGHTPOINTS=841.89 \
> - -dCompatibilityLevel=1.4 -dNOPAUSE -dBATCH -r1200 -sDEVICE=pdfwrite \
> - -sOutputFile='z\'x.pdf' -c .setpdfwrite -f 'z\'x.ps'
> 
> > Unless you use guile's system* function instead of system, which doesn't
> > run a shell and hence needs no escaping or quoting. That's probably a
> > safer and simpler approach.
> 
> Hmm, doesn't the -sOutputFile=.... argument still need some thought about 
> wrapping in quotes and escaping quotes?

If it does, then it's a gs bug IMO. The quoting should be only needed to
protect characters from the shell; once you have your filename in
**argv, it should be verbatim.

Joe






reply via email to

[Prev in Thread] Current Thread [Next in Thread]