I tried solving bug 268252 by using JAVA_ANT_ENCODING="UTF-8" variable. This causes the cElementTree rewriter to be used instead of 3rd generation rewriter. The problem is it does not append gentoo.classpath to <java> calls, so the build fails.
I tried setting JAVA_ANT_CLASSPATH_TAGS="javac java" but it did not help, the cElementTree rewriter ignores that.
Moreover, since default JAVA_ANT_CLASSPATH_TAGS is "javac xjavac" I start to wonder why 3rd-gen rewriter changes <java> calls as well? Couldn't find the reason.
The state of rewriters is quite messy IMHO, there are too many of them and it makes the eclass complex. Maybe we could get rid of all pre-gen3 since the version of javatoolkit that's pulled guarantees gen3? And then define and document properly all supported JAVA_ANT_ parameters and make sure they work in the remaining rewriters...
Well I was thinking that instead of messing with the current bloated eclasses any further I should just write them better from scratch.