Issue: When selecting a folder on OSX with Unicode characters, Revery crashes.
Defect: We were converting the returned string using:
cStringUsingEncoding:NSASCIIStringEncoding
That API returns NULL if the string cannot be losslessly encoded in the target format. In the case of a folder with Unicode characters, this API would return null, and the API was assuming that we'd always get a valid string.
Fix: Two fixes:
1) Use UTF-8 encoding instead of ASCII, so that the API can handle Unicode
2) Handle the NULL case more reliably - if there happens to be a folder we can't convert, don't segfault, skip it.
From https://github.com/onivim/oni2/issues/3519
Issue: When selecting a folder on OSX with Unicode characters, Revery crashes.
Defect: We were converting the returned string using:
That API returns
NULL
if the string cannot be losslessly encoded in the target format. In the case of a folder with Unicode characters, this API would return null, and the API was assuming that we'd always get a valid string.Fix: Two fixes: 1) Use UTF-8 encoding instead of ASCII, so that the API can handle Unicode 2) Handle the NULL case more reliably - if there happens to be a folder we can't convert, don't segfault, skip it.