...
Open the file in Notepad++.
In the lower right of the screen you can find the file encoding.
To find non UTF-8 in Notepad++ go to Encoding → Encode in UTF-8. The setting should highlight the special characters.
In the screenshot above the xA0 represents non UTF-8 characters that will throw errors when the script is passed to sqlcmd, sqlplus, and other utilities. Those characters will need to be deleted from the feed.
Additional if you want Notepad++ to move the cursor to non UTF-8 characters for easier removal, go to Search → Find characters in range…
Select Non-ASCII Characters (128-255)
Use ‘Find’ button to move the cursor to the special characters.
...
Commands for removing special characters
There are also a variety of programmatic methods for removing special characters. For example, you can use git bash to remove special characters with the tr command (from https://alvinalexander.com/blog/post/linux-unix/how-remove-non-printable-ascii-characters-file-unix/).
Code Block tr -cd '\11\12\15\40-\176' < file-with-binary-chars > clean-file