[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [Q] handling 0xC2A0 (space in utf8)
- From: "V S P" <toreason@...>
- Date: Thu, 16 Oct 2008 16:05:02 -0400
Hi Peter, thank you for your reply.
My knowledge is limited, and that's why I am probably not understanding
your reply completely.
Here is the editor I am using
In my 'language' documentation I am just saying that an identifier
must have a space preceding it.
So user can hit the space bar before typing the identifier.
You are saying that a stylesheet can control how the keyboard space
bar is being recorded within textarea of the editor's dom node?
If yes, I will then investigate that (as I have no idea how to
do this in CSS)
On the other hand, I am looking at it -- what if the text was
created by a UTF-8 capable editor, would that editor do exactly
the same thing as the web page: 0xC2A0? and if yes, then
my compiler should support it.
Right now I figured out this in PHP:
$utf8_text=str_replace( chr(0xC2).chr(0xA0),' ',$utf8_text);
- this seems to be working as LUA now can see the 'ascii' space
But I am thinking that there may be things that I am not anticipating,
and that my LPeg grammar to recognize space needs to be 'smarter'.
On Thu, 16 Oct 2008 15:41:12 -0400, "Peter Harris"
> 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.
V S P
http://www.fastmail.fm - Does exactly what it says on the tin