469,946 Members | 1,958 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,946 developers. It's quick & easy.

<option>


For a form POST, what's the difference between:

1. <option</option>
2. <option>&nbsp;</option>

--
iTech Consulting Services Limited
Expert in ePOS (Point-Of-Sales) solutions
Website: http://www.itech.com.hk (IE only)
Tel: (852)2325 3883 Fax: (852)2325 8288
May 10 '07 #1
9 3508
On May 10, 9:24 am, Man-wai Chang <toylet.toy...@gmail.comwrote:
For a form POST, what's the difference between:

1. <option</option>
2. <option>&nbsp;</option>
One contains a space, one contains a non-breaking space.

Neither are likely to be useful values to send to the server.

--
David Dorward

May 10 '07 #2
David Dorward wrote:
On May 10, 9:24 am, Man-wai Chang <toylet.toy...@gmail.comwrote:
>For a form POST, what's the difference between:

1. <option</option>
2. <option>&nbsp;</option>

One contains a space, one contains a non-breaking space.
non-breaking space is not the same as a space??

--
iTech Consulting Services Limited
Expert in ePOS (Point-Of-Sales) solutions
Website: http://www.itech.com.hk (IE only)
Tel: (852)2325 3883 Fax: (852)2325 8288
May 11 '07 #3
Man-wai Chang wrote:
David Dorward wrote:
>On May 10, 9:24 am, Man-wai Chang <toylet.toy...@gmail.comwrote:
>>For a form POST, what's the difference between:

1. <option</option>
2. <option>&nbsp;</option>

One contains a space, one contains a non-breaking space.

non-breaking space is not the same as a space??
a space is "breakable" and and a non-breaking is not.

space = ASCII 20 or 0x20
no-break space = ASCII 160 or 0xA0

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
May 11 '07 #4
space = ASCII 20 or 0x20
no-break space = ASCII 160 or 0xA0
Thank you.

--
iTech Consulting Services Limited
Expert in ePOS (Point-Of-Sales) solutions
Website: http://www.itech.com.hk (IE only)
Tel: (852)2325 3883 Fax: (852)2325 8288
May 11 '07 #5
On 2007-05-11, Jonathan N. Little <lw*****@centralva.netwrote:
Man-wai Chang wrote:
>David Dorward wrote:
>>On May 10, 9:24 am, Man-wai Chang <toylet.toy...@gmail.comwrote:
For a form POST, what's the difference between:

1. <option</option>
2. <option>&nbsp;</option>

One contains a space, one contains a non-breaking space.

non-breaking space is not the same as a space??

a space is "breakable" and and a non-breaking is not.

space = ASCII 20 or 0x20
no-break space = ASCII 160 or 0xA0
Not ASCII, surely? It's

U+00A0
UTF-8: 0xC2 0xA0
Decimal entity reference:  

and appears in a section called "Latin 1 Supplement".
May 11 '07 #6
Ben C <sp******@spam.eggswrites:
On 2007-05-11, Jonathan N. Little <lw*****@centralva.netwrote:
>no-break space = ASCII 160 or 0xA0

Not ASCII, surely?
Certainly not.

ASCII is 7-bit, from 0 to 127, or 0x00 to 0x7f.

sherm--

--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
May 11 '07 #7
Ben C wrote:
Not ASCII, surely? It's

U+00A0
UTF-8: 0xC2 0xA0
Decimal entity reference:  

and appears in a section called "Latin 1 Supplement".
Pardon: ASCII 0x20 = space, but 0xA0 = an 'a' with acute accent, &aacute;

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
May 11 '07 #8
On 2007-05-11, Jonathan N. Little <lw*****@centralva.netwrote:
Ben C wrote:
>Not ASCII, surely? It's

U+00A0
UTF-8: 0xC2 0xA0
Decimal entity reference:  

and appears in a section called "Latin 1 Supplement".

Pardon: ASCII 0x20 = space, but 0xA0 = an 'a' with acute accent, &aacute;
I think the point is, anything >0x7f is not ASCII. 0xA0 is nbsp in
Latin-1 supplement, but a-acute in some other character set (and who
knows maybe something else in another Latin-variant, like that Danish o
with a slash through it etc.).
May 11 '07 #9
Scripsit Jonathan N. Little:
>non-breaking space is not the same as a space??

a space is "breakable" and and a non-breaking is not.
They are two distinct characters, though in Unicode, the no-break space
U+00A0 is compatibility equivalent to <noBreakU+0020 space. Thus, in
principle, the main difference is in line breaking properties. In practice,
other differences can be more important, such as special treatment of U+00A0
as table cell content by web browsers.

Technically, when appearing in an <optionelement, the difference of the
codes of the characters is important, since it's the code that is sent as
part of the form data. The rest depends on what the form handler does with
the data.

But what could the difference matter when the character is the sole content
of an <optionelement, and why would an author use such a degenerated
element? I'm afraid the OP is getting farther from his original problem and
potentially generating new problems. Explaining the _real_ problem might be
a good start.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

May 13 '07 #10

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Ang Talunin | last post: by
6 posts views Thread by Chris Fink | last post: by
7 posts views Thread by Shrek | last post: by
14 posts views Thread by The Natural Philosopher | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.