Files
OrcaSlicer-bambulab/src/slic3r/Utils
Lukas Matena 78a3d8b63e Fixed ASCII folding for non-foldable non-ASCII characters
Problem: Add an object, name it using cyrilic, Slice, click Export: the proposed name is mangled. Affects all platforms, 2.2.0 was fine.

Cause: It is mangled during ASCII folding, which was broken with 28c0880 when it was generalized to be used from the fuzzy matcher.
    fold_to_ascii(wchar_t c, char *out) relies on narrowing char = wchar_t assignment, the old one used std::back_insert_iterator<std::wstring>.
    It is thus unable to leave a character alone even when it should (it should, right?).

Solution:
    1. Typed the fold_to_ascii function so it works on wchar_t only, which should mimic the old behaviour.
    2. Changed the respective call in fts_fuzzy_match.h. That function also works with wide char C-strings.

Cleanup:
    1. Removed the unused fold_utf8_to_ascii(const char *src) overload to avoid code duplication.
    2. Untemplated the fold_to_ascii(wchar_t c, std::back_insert_iterator<std::wstring>& out) function, it was never called with a different type.
    3. The function is now static in ASCIIFolding.cpp, nobody else needs to know.
2020-12-21 10:31:37 +01:00
..
2020-03-24 21:51:05 +01:00
2019-04-02 10:33:37 +02:00
2019-04-02 10:33:37 +02:00
2020-12-10 11:02:46 +01:00
2020-12-10 11:02:46 +01:00
2020-10-12 17:52:48 +02:00
2020-09-15 16:40:57 +02:00
2020-12-14 16:22:40 +01:00