Open GoogleCodeExporter opened 9 years ago
[deleted comment]
I use chinese in file path and meet the same problem with you.
JStestdriver use bytestream to read file path, you can upgrade JStestdriver by
yourself.
Try the below method.
1.find method toString(InputStream inputStream) in the source file
com.google.jstestdriver.HttpServer.java
2.change bytestream to charstream
see below.
private String toString(InputStream inputStream) throws IOException {
// StringBuilder sb = new StringBuilder();
// int ch;
//
// while ((ch = inputStream.read()) != -1) {
// sb.append((char) ch);
// }
// inputStream.close();
//
// return sb.toString();
BufferedReader in = new BufferedReader(new InputStreamReader(inputStream, new StandardCharsets().charsetForName("UTF-8")));
StringBuffer buffer = new StringBuffer();
int line;
while ((line = in.read()) != -1){
buffer.append((char)line);
}
inputStream.close();
return buffer.toString();
}
Original comment by qq807215...@gmail.com
on 20 Sep 2013 at 10:45
It's already fixed in master branch:
https://code.google.com/p/js-test-driver/source/diff?spec=svn170a4754abc99c3217d
349d55592b86a89000efd&r=170a4754abc99c3217d349d55592b86a89000efd&format=side&pat
h=/JsTestDriver/src/com/google/jstestdriver/HttpServer.java&old_path=/JsTestDriv
er/src/com/google/jstestdriver/HttpServer.java&old=33995a6decf4f728d5f4b76cb93a0
8137f1fd0c3
But there was no releases yet with this change included.
Original comment by Sergey.S...@gmail.com
on 20 Sep 2013 at 11:11
Original issue reported on code.google.com by
Sergey.S...@gmail.com
on 25 Jul 2012 at 3:28