lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Thu, Oct 16, 2008 at 3:20 PM, V S P wrote:
> I have spent about 2 days to figure out why certain things do not
> get recognized by my compiler, and it turns out that it only happens if
> I put a space preceeding my identifiers in the web page.

Ah, ha!

You can't put a (visible) space preceeding anything in HTML. It will
be dropped by the client. You probably have a broken HTML editor (most
are) that is inserting   (non-breaking space) characters behind
your back.

The correct way to adjust visible space is to use CSS.   should
only ever be used to keep a single entity from line breaking.

> So I am tracing it down from the web page, to json, to PHP, to lua
> and see that I am getting 0xC2A0 from the web page when I enter
> the 'space'.

Yup, 0xC2A0 is UTF-8 speak for NBSP.

NBSP isn't a space. It's an NBSP. Which is a character designed to
look like it is a space, but it really isn't. Treating an NBSP as a
space is probably a bug anyway.

Peter Harris