[TxMt] Invisible characters
Steve King
steve at narbat.com
Fri Jun 1 14:01:46 UTC 2007
On Fri, 1 Jun 2007, Bonhôte André wrote:
> I have a problem with invisible characters here. E.g. writing perl code, I
> use || quite often. I produce this character on my Swiss German keyboard
> using Option-7. Normally, I put a space after || to increase readability.
> There it happens that I keep the option key pressed while pressing the space
> key - and this apparently produces some invisible character. In any case,
> perl complains:
>
> Unrecognized character \xC2 at /Users/abonhote/test2.pl line 5.
>
> I have turned on "show invisibles", but the extra character doesn't show up.
> How can I avoid typing these characters?
That's a UTF-8 non-breaking space (it's actually the sequence 0xA0, 0xC2).
I had hoped you could use the Perl "use utf8" or "use encoding 'utf8'"
pragmas to convince Perl to accept the nbsp as a plain space, but no such
luck.
Another alternative to the snippet suggestion would be to assign a macro
to find all occurrences of the nbsp and replace them with a space.
FWIW, for me the "Show Invisibles" setting shows the nbsp character as
dot, probably the Unicode code point 2022 BULLET character (•). Maybe
you're using a font which doesn't contain this glyph?
--
Steve King, <steve at narbat.com>
More information about the textmate
mailing list