Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(475)

Issue 109070: Use our own ~s ly:format placeholder, since guile is broken with wide chars (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 10 months ago by Reinhold
Modified:
9 years, 10 months ago
CC:
lilypond-devel_gnu.org
Visibility:
Public.

Description

Use our own ~s ly:format placeholder, since guile is broken with wide chars We need our own ~S format placeholder to escape quotes, so use lilypond's string formating to make wide utf-8 chars work in filenames Guile seems unable to handle wide characters, so we mustn't use simple-format or format, because that will break with non-ANSI characters (char code > 255). Instead, Implement our own ~S placeholder, that wraps the string in double quotes and escapes backslashes and double quotes. Use this format placeholder to generate the proper cmd line args for our calls to gs.

Patch Set 1 #

Total comments: 3

Patch Set 2 : Also escape dollar signs #

Patch Set 3 : Fix indentation of braces #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+21 lines, -7 lines) Patch
M lily/general-scheme.cc View 1 2 4 chunks +18 lines, -4 lines 1 comment Download
M scm/backend-library.scm View 1 chunk +1 line, -1 line 0 comments Download
M scm/ps-to-png.scm View 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 5
joeneeman
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, "\"", "\\\""); Don't forget to escape ...
9 years, 10 months ago (2009-08-21 22:59:33 UTC) #1
Patrick McCarty
http://codereview.appspot.com/109070/diff/1/2 File lily/general-scheme.cc (right): http://codereview.appspot.com/109070/diff/1/2#newcode432 Line 432: else if (scm_is_string (arg)) { Can you also ...
9 years, 10 months ago (2009-08-21 23:49:51 UTC) #2
Reinhold
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 ...
9 years, 10 months ago (2009-08-22 00:11:34 UTC) #3
joeneeman
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 > ...
9 years, 10 months ago (2009-08-22 00:28:39 UTC) #4
Ian Hulin
9 years, 10 months ago (2009-08-22 12:29:57 UTC) #5
If we're covering shell variables for Windows, like $ for *ix, we'd need to
escape "%" character, too.
That way we'd handle cmd variables like %HOME% or %PATH%.

http://codereview.appspot.com/109070/diff/15/16
File lily/general-scheme.cc (right):

http://codereview.appspot.com/109070/diff/15/16#newcode440
Line 440: replace_all (&s, "$", "\\$");
You would need to add 
replace_all (&s, "%", "\\%"); 
to cover the similar case to "$" for Windows (shell variable substituion)
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b