[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[Dltk-dev] encoding problems in the dbgp protocol (in/output streams)
|
Hi,
a customer of us does have problems with UTF8 chars when using the debugger
for example he has a utf8 char in the function name.
Then the problem is that i get an exception that there is illegal utf in the stream
we now do this:
eclipse side:
receiver = new DbgpPacketReceiver(new BufferedInputStream(socket
.getInputStream()));
db engine side:
out = new PrintStream(socket.getOutputStream());
So that completely relies on system encoding.
If you would debug on system X and you have eclipse running on system Y this could be a problem.
Wouldnt it be better to use UTF-8 all the way?
something like this:
eclipse side:
receiver = new DbgpPacketReceiver(new BufferedReader(new InputStreamReader(socket.getInputStream(),"UTF8")));
db engine side:
out = new PrintStream(new BufferedWriter(new OutputStreamWriter(socket.getOutputStream(),"UTF8")));
problem is that we then have a reader instead of input stream, and quite a lot of code that works with inputstreams and bytes should then be changed
to use reader/chars