RE: Codereview request for 6995537: different behavior in iso-2022-jp encoding between jdk131/140/141 and jdk142/5/6/7

2012-02-09 Thread Jason Mehrens
Sherman, As a workaround, what about allowing a write of empty string or empty char array to call flushBuffer? If you call PrintStream.print() then flushBuffer is called on the internal writers. But if you try the same by doing OuputStreamWriter.write() the flushbuffer call is trapped by a

Re: Codereview request for 6995537: different behavior in iso-2022-jp encoding between jdk131/140/141 and jdk142/5/6/7

2012-02-09 Thread Xueming Shen
Jason, I might be misunderstanding your suggestion, but the current implementation of OutputStreamWriter.flushBuffer()/StreamWriter.implFlushBuffer() does not flush the encoder, so even the caller can choose when to invoke flushBuffer(), it does not solve the problem (flush() invokes

RE: Codereview request for 6995537: different behavior in iso-2022-jp encoding between jdk131/140/141 and jdk142/5/6/7

2012-02-09 Thread Jason Mehrens
Sherman, My mistake, I missed the fact that flushBuffer does not flush the encoder. I incorrectly thought that write/print caused the encoder to flush and only the direct call to OSW.flush did not. Jason Date: Thu, 9 Feb 2012 11:29:04 -0800 From: xueming.s...@oracle.com To: