On Tue, Dec 23, 2008 at 02:03:54AM -0000, for...@lyx.org wrote: > Author: forenr > Date: Tue Dec 23 03:03:53 2008 > New Revision: 27957 > > URL: http://www.lyx.org/trac/changeset/27957 > Log: > Take into account that '\' is always part of a LaTeX command and also > that entries in the unicodesymbols file may not start with '\'. > Maybe the method should be renamed as fromLaTeXCode? > > Modified: > lyx-devel/trunk/src/Encoding.cpp > > Modified: lyx-devel/trunk/src/Encoding.cpp > URL: http://www.lyx.org/trac/file/lyx-devel/trunk/src/Encoding.cpp?rev=27957 > ============================================================================== > --- lyx-devel/trunk/src/Encoding.cpp (original) > +++ lyx-devel/trunk/src/Encoding.cpp Tue Dec 23 03:03:53 2008 > @@ -496,8 +496,9 @@ > // If this is an exact match, we found a (longer) > // matching command in the unicodesymbols file > if ((math == tmp || text == tmp) > - && ((tmp.size() == 1 && !isAlphaASCII(tmp[0])) > - || k == cmdend || !isAlphaASCII(cmd[k]))) { > + && (tmp[0] != '\\' > + || (tmp.size() == 2 && !isAlphaASCII(tmp[1])) > + || k == cmdend || !isAlphaASCII(cmd[k]))) {
Could you add some comments to the condition or even put it into a boolean variable or even helper function? Andre'