- ConfigProfile_p.html now transmits usable encoding for other than 7-bit ASCII charset, see TODO in httpd.parseArg(String)

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3174 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
karlchenofhell 18 years ago
parent 35fb671721
commit 340dc52a9d

@ -14,7 +14,7 @@
<p>
You do not need to provide any personal data here, but if you want to distribute your contact information, you can do that here.
</p>
<form action="ConfigProfile_p.html">
<form action="ConfigProfile_p.html" accept-charset="ascii">
<fieldset>
<dl>
<dt><label for="name">Name</label></dt>

@ -777,6 +777,19 @@ public final class httpd implements serverHandler {
baos.write(Integer.parseInt(s.substring(pos + 2, pos + 6), 16));
pos += 6;
} else { // normal escape
// currently one escape is treated as one char, which only works if
// formulars accept-charset=ascii are used. This is wrong if
// formulars are set to accept-charset=UTF-8, then many escaped bytes
// are sent, but they belong together to one char
// TODO: UTF-8 escapes: i.e. "%C3%A4" should be 'ä', but is now "ä"
// - parse out subsequent escapes
// - check which of these 'belong together', see http://de.wikipedia.org/wiki/UTF-8
// - write the UTF-8 escapes together as one char
// XXX: implement an own UTF-8 converter as described above or
// revert this method to use bytes and let Java do the UTF-8-parsing?
// i.e. new String(result[], "UTF-8");
baos.write(Integer.parseInt(s.substring(pos + 1, pos + 3), 16));
pos += 3;
}

Loading…
Cancel
Save