Whoops .. my bad you're right, I read past one of the lines.

again, a summary of roughly what happens:

ByteArrayOutputStream baos = new BAOS();
PrintWriter pw = new PrintWriter(new OutputStreamWriter(baos));
pw.print(tagvalue);

I think you can instantiate a PrintWriter with a character encoding, but I'm surprised the default doesn't work properly... I suspect that the encoding format of Java and the encoding format of the Empeg are different. I would imagine that PrintWriter uses UTF-8 by default.

Mike