mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-25 05:55:34 +00:00
Consider file encoding for modules in reconfigure
If the modules are not in utf8 then we warn and skip that file
like it happens for layout files.
This a port of commit a8094051c1
to stable.
This commit is contained in:
parent
65c8e70588
commit
f548903630
@ -1584,9 +1584,17 @@ def checkModulesConfig():
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
seen.append(filename)
|
seen.append(filename)
|
||||||
|
try:
|
||||||
retval = processModuleFile(file, filename, bool_docbook)
|
retval = processModuleFile(file, filename, bool_docbook)
|
||||||
if retval:
|
if retval:
|
||||||
tx.write(retval)
|
tx.write(retval)
|
||||||
|
except UnicodeDecodeError:
|
||||||
|
logger.warning("**************************************************\n"
|
||||||
|
"Module file '%s'\n"
|
||||||
|
"cannot be decoded in utf-8.\n"
|
||||||
|
"Please check if the file has the correct encoding.\n"
|
||||||
|
"Skipping this file!\n"
|
||||||
|
"**************************************************" % filename)
|
||||||
tx.close()
|
tx.close()
|
||||||
logger.info('\tdone')
|
logger.info('\tdone')
|
||||||
|
|
||||||
|
@ -114,3 +114,7 @@ What's new
|
|||||||
|
|
||||||
- Wininstaller, fix bug where previous installations, with emergency version
|
- Wininstaller, fix bug where previous installations, with emergency version
|
||||||
greater than 1, could not be seen in registry on overinstall
|
greater than 1, could not be seen in registry on overinstall
|
||||||
|
|
||||||
|
- Do not break configuration if a module file is not decodable (file
|
||||||
|
not encoded in utf-8). Rather than that, issue a warning and skip
|
||||||
|
that file (a variant of bug 11736).
|
||||||
|
Loading…
Reference in New Issue
Block a user