Bo Peng wrote:
Fixed as well. See patch attached in Bugzilla.

http://bugzilla.lyx.org/show_bug.cgi?id=5349 is easy to fix as long as
someone knows how to quote a string with " properly.

Easy enough. The common way in unix is to use the
backslash as an escape character.
So you use \" in order to treat the " sign as any
other letter.

The same approach works for any other character that
has special interpretation. Put a backslash in front
in order to _not_ treat it specially. (Might be useful
for single quotes, spaces, ...)

And if you need a backslash then the backslash can be
escaped too, so use \\ to get a single normal backslash.

If the backslash is inconvenient for some reason, such as
already being in heavy use - find some other escape character instead.


The escape character trick is so common in unix, I'd be surprised if there isn't already a library offering this functionality.


There are other approaches, like using single quotes around
strings containing double quoutes and vice-versa. Those approaches
tend to be less robust - there are usually some strings containing _all_ the quote characters that cannot be represented. The "escape character" way works for all cases, and is considered easy to implement too. There is only one special case - the escape character. The trick is well known and well tested in unix environments. It is what you use when someone
makes a file name that contains various quote characters and spaces...

Helge Hafting

Reply via email to