The API you need to use if using a JDK older than 1.4 is this one PrintWriter out = charset != null ? new PrintWriter(new OutputStreamWriter(ps, charset)) : new PrintWriter(ps); (these are lines from Message.java in ant 1.6alpha) charset is "UTF-8" in the case that you have in mind. You might want to create a clone of DefaultLogger which would be using internally printwriters to write the messages, instead of using streams directly. Hopes this helps, Antoine ----- Original Message ----- From: "Myriam Delperier" To: Sent: Tuesday, September 02, 2003 9:13 AM Subject: ant and utf-8 > Hello, > i've written a class which implements BuildLogger. > I'd like to have my log messages written in UTF-8 but i don't know how to do > it. > > I can't write this : > public void setOutputPrintStream(PrintStream output) { > > try { > > this.out = new PrintStream(output, true, "UTF-8"); > > } catch (UnsupportedEncodingException e) { > > this.out = new PrintStream(output, true); > > } > > > because it only works with java 1.4... > > i've tried to add this in my scritps : -Dfile.encoding=UTF-8 but it doesn't > work ... > ant it has to work on each OS > if somebody can help me > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org