cef555e9a4
<https://lists.freedesktop.org/archives/libreoffice/2023-November/091151.html>
"CppunitTest_stoc_uriproc failed on Windows" reports that
translateToExternal("file:///abc/%feef") produces an empty string (indicating
failure) instead of "file:///abc/%FEef" (as expected in
stoc/test/uriproc/test_uriproc.cxx) when osl_getThreadTextEncoding() is Shift
JIS.
This was due to how the call to rtl::Uri::encode in
Translator::translateToExternal (in
stoc/source/uriproc/ExternalUriReferenceTranslator.cxx) behaved: It internally
interpreted its input "%FE" as the single-byte Shift JIS character 0xFE. Which
gets mapped to U+2122 as an extension (see "APPLE additions over SJIS, we
convert this like Apple, because I think, this gives better result, then [sic]
we take a replacement char" in sal/textenc/tcvtjp6.tab) in readUcs4, but which
in turn doesn't get mapped back to any Shift JIS character in writeEscapeChar.
Translator::translateToExternal is the only user of
rtl_UriEncodeStrictKeepEscapes, as introduced by
|
||
---|---|---|
.. | ||
alloc_arena.cxx | ||
alloc_arena.hxx | ||
alloc_cache.cxx | ||
alloc_cache.hxx | ||
alloc_fini.cxx | ||
alloc_global.cxx | ||
alloc_impl.hxx | ||
bootstrap.cxx | ||
byteseq.cxx | ||
cipher.cxx | ||
cmdargs.cxx | ||
crc.cxx | ||
digest.cxx | ||
hash.cxx | ||
hash.hxx | ||
locale.cxx | ||
math.cxx | ||
random.cxx | ||
rtl_process.cxx | ||
strbuf.cxx | ||
strimp.cxx | ||
strimp.hxx | ||
string.cxx | ||
strtmpl.hxx | ||
unload.cxx | ||
uri.cxx | ||
ustrbuf.cxx | ||
ustring.cxx | ||
uuid.cxx |