1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.0//EN"
2 "http://www.w3.org/TR/REC-html40/strict.dtd">
3 <meta http-equiv=
"Content-Type" content=
"text/html; charset=macintosh">
4 <meta http-equiv=
"Content-Script-Type" content=
"application/ecmascript">
5 <title>non-breaking space in forms (ELinks bug
811)
</title>
6 <h1>non-breaking space in forms (ELinks bug
811)
</h1>
8 <p>Setting protocol.http.trace =
1 and ecmascript.enable =
1 may be a good idea.
</p>
11 <tr><th>Unicode
<th>macintosh
<th>koi8-r
<th>cp850
12 <tr><td>U+
0001 <td>0x01<td>-
<td>0x01
13 <tr><td>U+
00A0
 <td>0xCA<td>0x9A<td>0xFF
14 <tr><td>U+
00F7
÷<td>0xD6<td>0x9F<td>0xF6
17 <h2>GET without accept-charset; ambient macintosh
</h2>
18 <form name=
"form1" action=
"http://localhost:60000/" method=
"GET">
19 <p><input type=
"reset"><input type=
"button" onclick=
"prepare('1')" value=
"Run script"><input type=
"submit">
21 <tr><td><th>Input
<th>List of characters
22 <tr><td>Please type a non-breaking space:
<td><input name=
"a1"><td><input id=
"a1p" readonly
size=
"30">
23 <tr><td>Pre-filled non-breaking spaces:
<td><input name=
"b1" value=
"   Ê"><td><input id=
"b1p" readonly
size=
"30">
24 <tr><td>U+
0001 U+
00A0 U+
00F7 from script:
<td><input name=
"c1"><td><input id=
"c1p" readonly
size=
"30">
28 <h2>POST without accept-charset; ambient macintosh
</h2>
29 <form name=
"form2" action=
"http://localhost:60000/" method=
"POST" enctype=
"multipart/form-data">
30 <p><input type=
"reset"><input type=
"button" onclick=
"prepare('2')" value=
"Run script"><input type=
"submit">
32 <tr><td><th>Input
<th>List of characters
33 <tr><td>Please type a non-breaking space:
<td><input name=
"a2"><td><input id=
"a2p" readonly
size=
"30">
34 <tr><td>Pre-filled non-breaking spaces:
<td><input name=
"b2" value=
"   Ê"><td><input id=
"b2p" readonly
size=
"30">
35 <tr><td>U+
0001 U+
00A0 U+
00F7 from script:
<td><input name=
"c2"><td><input id=
"c2p" readonly
size=
"30">
39 <h2>GET with
accept-charset=
"koi8-r, cp850"; ambient macintosh
</h2>
40 <form name=
"form3" action=
"http://localhost:60000/" method=
"GET" accept-charset=
"koi8-r, cp850">
41 <p><input type=
"reset"><input type=
"button" onclick=
"prepare('3')" value=
"Run script"><input type=
"submit">
43 <tr><td><th>Input
<th>List of characters
44 <tr><td>Please type a non-breaking space:
<td><input name=
"a3"><td><input id=
"a3p" readonly
size=
"30">
45 <tr><td>Pre-filled non-breaking spaces:
<td><input name=
"b3" value=
"   Ê"><td><input id=
"b3p" readonly
size=
"30">
46 <tr><td>U+
0001 U+
00A0 U+
00F7 from script:
<td><input name=
"c3"><td><input id=
"c3p" readonly
size=
"30">
50 <h2>POST with
accept-charset=
"koi8-r, cp850"; ambient macintosh
</h2>
51 <form name=
"form4" action=
"http://localhost:60000/" method=
"POST" enctype=
"multipart/form-data" accept-charset=
"koi8-r, cp850">
52 <p><input type=
"reset"><input type=
"button" onclick=
"prepare('4')" value=
"Run script"><input type=
"submit">
54 <tr><td><th>Input
<th>List of characters
55 <tr><td>Please type a non-breaking space:
<td><input name=
"a4"><td><input id=
"a4p" readonly
size=
"30">
56 <tr><td>Pre-filled non-breaking spaces:
<td><input name=
"b4" value=
"   Ê"><td><input id=
"b4p" readonly
size=
"30">
57 <tr><td>U+
0001 U+
00A0 U+
00F7 from script:
<td><input name=
"c4"><td><input id=
"c4p" readonly
size=
"30">
61 <script type=
"application/ecmascript">
62 function prepare(num) {
63 var form = window.document.forms[
"form" + num];
64 form.elements[
"c" + num].value =
"\u0001\u00a0\u00f7";
65 var expose = function(elname) {
66 var src = form.elements[elname].value;
68 for (var i =
0; i < src.length; ++i) {
69 dst +=
"U+" + src.charCodeAt(i).toString(
16) +
" ";
71 form.elements[elname +
"p"].value = dst;