bsdiff-node
bsdiff-node copied to clipboard
[BUG] Error: No such file or directory when the file path contains chinese character
the patch api throws error 'No such file or directory' when the file path contains chinese character on Windows 10.
const oldFile = 'C:\\Users\\famingyuan\\Desktop\\rhtx\\release\\1.2.0\\v1.2.0-win64-prod-c626ef.asar'
const newFile = 'C:\\Users\\famingyuan\\Desktop\\rhtx\\release\\1.3.0\\result.asar'
const patchFile = 'C:\\Users\\famingyuan\\Desktop\\rhtx\\release\\1.3.0\\中文\\win64-prod-c626ef-96fdc1.patch'
try {
bsdiff.patch(oldFile, newFile, patchFile, function (result) {
// console.log('progress:' + result + '%')
})
} catch (err) {
console.error(err) // No such file or directory
}
same issue, need help
Thanks for your feedback. Don't hesitate to make a PR.
Thanks for your feedback. Don't hesitate to make a PR.
😂Really know very very little about cpp.
I don't have time now. But I checked this soon as possible.
I don't have time now. But I checked this soon as possible.
Thanks♪(・ω・)ノ
It seems to have the same problem with accents like "é" and similar on Windows.
I just saw that by trying to print a unicode character (std::cout << é << std::endl; or printf). I have the same problem. So it doesn't seem to be related to Nan::Utf8String. Rather on the side of node-gyp. I tried to add UNICODE, _UNICODE in the binding.gyp but not success.
same issue, need help
I just saw that by trying to print a unicode character (
std::cout << é << std::endl;orprintf). I have the same problem. So it doesn't seem to be related to Nan::Utf8String. Rather on the side of node-gyp. I tried to add UNICODE, _UNICODE in the binding.gyp but not success.
I fixed it, look at this PR: https://github.com/Brouilles/bsdiff-node/pull/26
Version 2.5.0 now available with your PR. Thanks.