Whether it is SharePoint or OneDrive, the list of invalid characters is the same. You can check the aforementioned list to get an overview of the invalid characters that are not supported by SharePoint. In order to get over this problem, you need to rename the file as per the official guidelines.