ZWSP appearing only in IntelliJ
Answered
I have two test files from an open source project. The tests run ok from the command line and in IntelliJ. When the test file is opened in the IDE, what appears to be a zero width space character [ZWSP] is appearing at the end of each method name. This is happening on all of the tests in both files. These test classes do not appear to use auto generation tools. I can not reproduce this problem in other IDE. Any ideas would be appreciated.
Please sign in to leave a comment.
Can you check it in the hex viewer? If there is ZWSP in the code, what's the problem with the IDE then?
It appears it is the UTF-8 Hex: 0xE2 0x80 0x8B (e2808b)?
Yes, so it's indeed in your code.
Indeed. Thank you.
(Q) Is there an easy way to remove them all, inside IntelliJ?
Yes. I selected one then opened the Edit | Find | Replace ... dialog and pasted the character. It's important to note that the character does not display :-).
Then clicked on Replace All, and all of these were deleted/replaced with an empty string.