lyxerr[Debug::INFO] << "Deleting tmp dir " << package().temp_dir() << endl;
if (!destroyDir(package().temp_dir())) {
- docstring const msg =
- bformat(_("Unable to remove the temporary directory %1$s"),
- from_utf8(package().temp_dir()));
+ // FIXME UNICODE: package().temp_dir() could in theory contain utf8 characters.
+ // We cannot use from_utf8() here because this involves the use of static data
+ // that may have been destroyed already on Mac systems.
+ docstring const msg = _("Unable to remove the temporary directory") + " "
+ + package().temp_dir().c_str();
Alert::warning(_("Unable to remove temporary directory"), msg);
}
}
void utf8_to_ucs4(std::string const & utf8, docstring & ucs4)
{
+ // FIXME (Abdel 17/11/06): static data are evil!
+ // This function cannot be used in the final exit process on Mac because
+ // static data are already destroyed at this stage.
+ // One solution would be to instantiate the utf8 to ucs4 IconvProcessor as a
+ // singleton inside the LyX main class to ensure that it does not get
+ // destroyed too early.
static IconvProcessor iconv(ucs4_codeset, "UTF-8");
size_t n = utf8.size();