I keep finding CTRL-P (ASCII 10) characters being added to random places in my documents. They appear to be impossible to find or remove in Scrivener. I have to compile down to ASCII to find the CTRL-P characters.
The only way to “find” these characters is to move your cursor around with left and right arrows. If your cursor fails to move on a key press, you’ve found one of these non-printable characters. Move past it and then backspace to remove it.
Invisible characters I can’t find/remove by any method other than compiling to ascii isn’t very user friendly.
I do agree, I’ve never been a fan of Apple’s approach here of just hiding symbols that cannot be printed (unless it is their purpose to be hidden, like the word-joiner character). That approach is probably responsible for a lot of clutter in text files that goes unnoticed, and can even interfere with normal functioning of the software, causing crashes and compile halts with some characters. There isn’t much we can do about that part of it unfortunately.
What I’m wondering is how the characters are getting into the document to begin with, and with such regularity. Ctrl-P doesn’t do anything on my system.
You could easily provide the ability to search for, flag, or remove any unprintable character.
They appear almost exclusively around URLs which were likely pasted in from a browser. It is possible that the few other occurrences were due to editing done after the paste which moved the invisible character around.
Which goes back to my other post about disabling special characters and formatting in paste…
I’ll see if there is something that can be done about somehow searching for them. It doesn’t come up a lot, but it is one of those things that is hard to know how to look for.
What I recommend people do who need to find one is make a text file with all of these characters in it, one after the other with a space between each one. You can set the file aside in case you need it again in the future. Paste the contents of the file into Project Search with “All Words” set, and that will show a list of each document in the project containing at least one of those codes. Use whatever method you prefer to clean the files (I use TextWrangler for this kind of stuff) in the list.
Since you’re having problems with the source being a thing you commonly copy from, you might want to save it as a saved search collection so you can routinely clean them out. You wouldn’t even need a tool like TextWrangler if you know which character is the culprit. Search for it alone, and then you can Scrivenings mode to search and replace the character out of the files.
Hopefully that helps, and for now like I say, I’ll check on the feasibility of a search.