When typing a space character in Xcode, a warning appears sometimes:
Non-breaking space (U+00A0) used instead of regular space
Earlier Xcode versions display these messages:
Treating Unicode character as whitespace
or
Invalid character in source file
If I re-write the character, the warning disappears. What causes this?
That happens to me when I type too fast and accidentally hold down Alt while pressing down Space. This creates a non-breaking space (0xA0
) which is not recognized as a valid space character by Xcode.
For a (hacky) solution, I've remapped this combination to Insert Tab inside Xcode's Preferences/Key Bindings, so it enters a tabulator character instead.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With