I think it should be explicitly converted, otherwise it's likely that the default encoding of the JVM will be used, which is unpredictable because it is derived from lang & locale settings at the time the JVM is started.