Charset.encode and Charset.decode only work for a single call. The reason is that the encoder/decoder is cached and after the first call it will be in the flushed state.
The second call will thus throw an InvalidStateException. Removing the cache or resetting the cached object should solve this. -- Summary: Charset.encode and Charset.decode broken Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: critical Priority: P2 Component: libgcj AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: luca dot barbieri at gmail dot com CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21140