Michael Gerz schrieb:
If you include a graphics, which is placed in a directory with German
umlauts, the graphics file name get corrupted. This also happens if
the relative path is umlaut-free.
I think we should fix this bug before beta 2, because it corrupts your
documents silently.
Something very bad is going on in makeRelPath:
// Make relative path out of two absolute paths
string const makeRelPath(string const & abspath, string const &
basepath)
// Makes relative path out of absolute path. If it is deeper than
basepath,
// it's easy. If basepath and abspath share something (they are
all deeper
// than some directory), it'll be rendered using ..'s. If they are
completely
// different, then the absolute path will be used as relative path.
{
lyxerr << "makeRel " << abspath << endl;
string::size_type const abslen = abspath.length();
string::size_type const baselen = basepath.length();
lyxerr << "abspath " << abslen << " " <<
from_utf8(abspath).length() << endl;
// FIXME UNICODE
docstring::size_type i =
os::common_path(from_utf8(abspath),
from_utf8(basepath));
In my case, abspath is printed on the console and AFAICS, it has more
than 80 characters (roughly counted).
However, the second output gives "abspath 56 55"! That means
- the length of abspath is not computed correctly
- the length of the string and the converted docstring are not identical
=> I am not surprised that things don't work.
Does anybody have an idea?
Michael