Search code examples
xcodewhitespace

How do I differentiate between different whitespace characters in Xcode 10?


I can show whitespace ("invisibles") in Xcode 10, and some of the resulting placeholder glyphs are easy to figure out, but I cannot figure out all of them.

For instance, which line ending is this supposed to represent: ¤?

Is there a list of all of them, or is there a convention for representing whitespace characters with other glyphs that I have missed?


Solution

  • The ¤ character represents a CR (carriage return) line ending. Windows files typically use CRLF (carriage return & line feed) line endings, which are represented with ¤┐. Old versions of macOS only used CR as a line ending. (source)

    Full list:

    ╔════════╦══════════════════════════════════════════════════╗
    ║ Symbol ║                     Meaning                      ║
    ╠════════╬══════════════════════════════════════════════════╣
    ║ ·      ║ space                                            ║
    ║ ···•   ║ tabulator (when Indent Using is set to "Spaces") ║
    ║ »      ║ tabulator (when Indent Using is set to "Tabs")   ║
    ║ ¤      ║ CR line ending                                   ║
    ║ ┐      ║ LF line ending                                   ║
    ║ ¤┐     ║ CRLF line ending                                 ║
    ╚════════╩══════════════════════════════════════════════════╝