Re: escape strings in grub.cfg

2010-04-13 Thread BVK Chaitanya
On Mon, Apr 12, 2010 at 10:19 PM, BVK Chaitanya wrote: > On Mon, Apr 12, 2010 at 5:39 AM, Colin Watson wrote: >> >> In other words, only ' is special (as a terminator) when reading a >> single-quoted string, and the sequences " $ \\ \" \n are special inside >> a double-quoted string.  (Incidental

Re: escape strings in grub.cfg

2010-04-13 Thread Carles Pina i Estany
Hi, On Apr/13/2010, Colin Watson wrote: > On Mon, Apr 12, 2010 at 01:09:06AM +0100, Colin Watson wrote: > > With my suggestion, I'd recommend: > > > > gettext_quoted () { > > gettext "$@" | sed "s/'/'''/g" > > } > > > > ... and then make sure it's enclosed in '' rather than "" where

Re: escape strings in grub.cfg

2010-04-13 Thread Colin Watson
On Mon, Apr 12, 2010 at 01:09:06AM +0100, Colin Watson wrote: > With my suggestion, I'd recommend: > > gettext_quoted () { > gettext "$@" | sed "s/'/'''/g" > } > > ... and then make sure it's enclosed in '' rather than "" wherever it's > used (or modify the sed to put single-quotes at

Re: escape strings in grub.cfg

2010-04-12 Thread Colin Watson
On Mon, Apr 12, 2010 at 12:23:01PM -0500, richardvo...@gmail.com wrote: > On Sun, Apr 11, 2010 at 7:09 PM, Colin Watson wrote: > > On Sat, Apr 10, 2010 at 10:10:15PM +0100, Carles Pina i Estany wrote: > >> +gettext_escape_double_quotes () > >> +{ > >> +  echo -n $(gettext $@) | sed 's/\"/\\\"/' >

Re: escape strings in grub.cfg

2010-04-12 Thread richardvo...@gmail.com
On Sun, Apr 11, 2010 at 7:09 PM, Colin Watson wrote: > On Sat, Apr 10, 2010 at 10:10:15PM +0100, Carles Pina i Estany wrote: >> Last weekend, the Asturian team found a bug in Grub. Thanks for the >> debugging. The string that appears in grub.cfg for "Loading the initram" >> in Asturian is "Cargand

Re: escape strings in grub.cfg

2010-04-12 Thread BVK Chaitanya
On Mon, Apr 12, 2010 at 5:39 AM, Colin Watson wrote: > > In other words, only ' is special (as a terminator) when reading a > single-quoted string, and the sequences " $ \\ \" \n are special inside > a double-quoted string.  (Incidentally, I think there's another bug > here; if $ is special, \$ sh

Re: escape strings in grub.cfg

2010-04-11 Thread Colin Watson
On Sat, Apr 10, 2010 at 10:10:15PM +0100, Carles Pina i Estany wrote: > Last weekend, the Asturian team found a bug in Grub. Thanks for the > debugging. The string that appears in grub.cfg for "Loading the initram" > in Asturian is "Cargando'l discu RAM inicial...". So grub.cfg looks > like: >

escape strings in grub.cfg

2010-04-10 Thread Carles Pina i Estany
Hello, Last weekend, the Asturian team found a bug in Grub. Thanks for the debugging. The string that appears in grub.cfg for "Loading the initram" in Asturian is "Cargando'l discu RAM inicial...". So grub.cfg looks like: echoCargando'l discu RAM inicial... This is syntactically inva