Dealng with 'Unicode character not set up for use with LaTeX' errors

When using 8-bit versions of TeX (e.g. pdfLaTeX, LaTeX + dvipdfmx, etc) TeX uses an old font system that cannot process all characters that might be pasted in. Usually this occurs due to pasting from a webpage, a PDF etc, when you pick up invisible characters and paste them in. In that case you might see an error such as the following

Unicode character (U+202C) not set up for use with LaTeX

To solve this, you need to remove the characters from the source. On macOS, you can do that as follows

  • Open System Preferences
  • Open Keyboard section
  • Open the Input Sources tab
  • If it is not in the list, please add the Unicode Hex Input source by pressing the plus button at the bottom of the list
  • Open the document giving you this error in Texpad (although other editors would work as well)
  • Choose Unicode Hex Input as your input source in the language option in the system bar at the top right of the screen
  • Open the search
  • Hold left Alt key , and press the characters following the U+ in the error message. For the example above you would
    • press left Alt key down
    • press 2, 0, 2, c
    • release left Alt key
  • Execute the search, this should look for all instances of the problem character in your document
  • Choose to replace all these characters with a blank string to remove the problem characters
  • If no longer required switch away from Unicode Hex Input and remove the input source in System Preferences

This should remove all instances of character U+202C and resolve those typeset errors. Repeat the process for all such characters that are causing errors.

Note: These instructions apply to the specific character U+202C. For other characters, such as U+202A, adjust the instructions accordingly. It might be advisable to search online for the exact instructions n how to enter the key combination for a unicode character. A helpful site may be UnicodePlus where above instructions for typing U+202C may be found.