office-gobmx/helpcompiler/source
Mike Kaganski 83b2ac7733 Use GetShortPathNameW workaround on Windows for help indexer
Lucene does not accept Unicode paths; it uses thread encoding. On
Windows, that makes it fail for any path that contains characters
not representable in ACP. Using short path name tries to workaround
that when first attempt has failed.

Since Windows 10 build 17134, the UCRT supports using a UTF-8 code
page: see
https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/setlocale-wsetlocale.
This has benefit of using Unicode, but I hesitate using it, since I
am not sure if setting the locale globally to UTF8 is a good idea
(what side effects may it have on other external libraries or our
use of CRT functions, when thread encoding differs from C locale?),
and if only setting it at object creation, it would crash later,
when attempting to access the stored Unicode path with restored old
locale.

Change-Id: I6a3a5a84ba54d8046ec011989289c9c7d5fa5c92
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108484
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-01-02 07:25:45 +01:00
..
BasCodeTagger.cxx
HelpCompiler.cxx
HelpIndexer.cxx
HelpIndexer_main.cxx
HelpLinker.cxx
HelpLinker_main.cxx
HelpSearch.cxx
LuceneHelper.cxx
LuceneHelper.hxx