Hi everyone,
Trying to use juce::FileChooser but the path from a specific file is failing due to bad decoding:
auto string = juce::String::fromUTF8("Desfa%C3%A7atez.mp3");
auto result = juce::URL::removeEscapeChars(string);
Expected: Desfaçatez.mp3
Getting: Desfaçatez.mp3p
The decoding itself appears to be ok, but since the elements are shifted using memmove the end of the string is not corretly set. This then is exposed as
return String::fromUTF8 (utf8.getRawDataPointer(), utf8.size()); will not use the safe access of the operator, which will return ‘\0’ for utf8[15].
Using another array to store the result and not using removeRange will fix it, but it will use another array.
Sorry if there is already something open about this, had done a quick search and didn’t found anything.
Thanks,
Alexandre F.
