In message <[EMAIL PROTECTED]>, Mark Himsley writes: >Ug - I guess attachments don't get through the list server... And I don't >even know if you want to see this on this list at all. Sorry in advance if >I've committed a faux par.
I guess technically they're supposed to go to commons-dev, but I'm not going to complain :) I want to apply your patch, but I can't for two reasons. The first is that PrintStream converts strings to bytes using the platform's default character encoding. We can fix that with output = new PrintStream(_output_, false, "US-ASCII"); but then there's the problem that PrintStream methods don't throw IOException and hide the real cause of an error, only leaving you with checkError() to see if something went wrong. Will wrapping the output stream with a BufferedOutputStream using a sufficiently large buffer also work for you? Unfortunately, there's still the issue of turning the string into straight ASCII bytes over the wire without touching backward incompatible CharsetEncoder. How about either: output = new DataOutputStream(new BufferedOutputStream(_output_, someSize)); or BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(_output_, "US-ASCII"), someSize); daniel --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
