Merge remote-tracking branch 'upstream/v50' …

 - missing change
 - fix mixed char/wchar/TCHAR usage