I want to copy some text that contain control characters (example: LF, NUL, BEL, etc...)

Seemly OSX defaults don't let me, if I choose for example a text that is like this:

'abcdNULefg' to copy and paste, it pastes only 'abcd'

  • Where are you copying the text containing control chars from? – John N Dec 6 '16 at 8:19
  • sublime text, but this happen in any editor that rely on the clipboard. – speeder Dec 6 '16 at 16:48
  • Sorry, I'm still trying to get a handle on what you're attempting. These are ANSI control chars? How do they appear in Sublime? (Presumably you're not literally seeing "NUL", but a 1 character sequence?) Where are you pasting them? – John N Dec 6 '16 at 18:10

You can try using this method.

From the finder menu > special characters > latin. Once there, select any characters you like and add to favorites.

Also, once copied, From the edit menu > Paste and Match style.

  • And how I do that to handle large texts littered with such characters? Using your instructions the only thing I could figure is insert the stripped characters back one by one. – speeder Dec 6 '16 at 1:30
  • You can use the second part of the answer.. paste and match style once something is copied. – norcal johnny Dec 6 '16 at 1:32
  • What I mean is, I need to copy for example a text that is hundreds pages long and contains lots of characters OSX by default doesn't copy at all, that tool there don't let me tell OSX to copy those chars, I would have to manually copy parts of the text, paste, then paste the special chars from the tool, then copy the next part, paste, then paste the special chars form the tool again... – speeder Dec 6 '16 at 1:35
  • Also, I am trying to do the thing your suggested, and the characters I want (NUL for example, mentioned on my post above) don't show up at all. – speeder Dec 6 '16 at 1:37

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.