diff --git a/source/de/anomic/http/httpc.java b/source/de/anomic/http/httpc.java
index a79fef42d..acd86f72a 100644
--- a/source/de/anomic/http/httpc.java
+++ b/source/de/anomic/http/httpc.java
@@ -1013,29 +1013,29 @@ public final class httpc {
Enumeration e = args.keys();
while (e.hasMoreElements()) {
// start with a boundary
- out.write(boundary.getBytes());
+ out.write(boundary.getBytes("UTF-8"));
out.write(serverCore.crlf);
// write value
key = (String) e.nextElement();
value = args.get(key, "");
if ((files != null) && (files.containsKey(key))) {
// we are about to write a file
- out.write(("Content-Disposition: form-data; name=" + '"' + key + '"' + "; filename=" + '"' + value + '"').getBytes());
+ out.write(("Content-Disposition: form-data; name=" + '"' + key + '"' + "; filename=" + '"' + value + '"').getBytes("UTF-8"));
out.write(serverCore.crlf);
out.write(serverCore.crlf);
out.write((byte[]) files.get(key));
out.write(serverCore.crlf);
} else {
// write a single value
- out.write(("Content-Disposition: form-data; name=" + '"' + key + '"').getBytes());
+ out.write(("Content-Disposition: form-data; name=" + '"' + key + '"').getBytes("UTF-8"));
out.write(serverCore.crlf);
out.write(serverCore.crlf);
- out.write(value.getBytes());
+ out.write(value.getBytes("UTF-8"));
out.write(serverCore.crlf);
}
}
// finish with a boundary
- out.write(boundary.getBytes());
+ out.write(boundary.getBytes("UTF-8"));
out.write(serverCore.crlf);
}
// create body array
diff --git a/source/de/anomic/http/httpd.java b/source/de/anomic/http/httpd.java
index 238316b1d..f724b3643 100644
--- a/source/de/anomic/http/httpd.java
+++ b/source/de/anomic/http/httpd.java
@@ -1118,14 +1118,14 @@ public final class httpd implements serverHandler {
tp.put("printStackTrace",1);
serverByteBuffer errorMsg = new serverByteBuffer(100);
- errorMsg.append("Exception occurred: ")
- .append(stackTrace.toString())
- .append("\r\n\r\n")
- .append("TRACE:\r\n");
+ errorMsg.append("Exception occurred: ".getBytes("UTF-8"))
+ .append(stackTrace.toString().getBytes("UTF-8"))
+ .append("\r\n\r\n".getBytes("UTF-8"))
+ .append("TRACE:\r\n".getBytes("UTF-8"));
stackTrace.printStackTrace(new PrintStream(errorMsg));
- errorMsg.append("\r\n");
+ errorMsg.append("\r\n".getBytes("UTF-8"));
- tp.put("printStackTrace_stacktrace",errorMsg.toString().replaceAll("\n","
"));
+ tp.put("printStackTrace_stacktrace",(new String(errorMsg.getBytes(),"UTF-8")).replaceAll("\n","
"));
} else {
tp.put("printStackTrace",0);
}