On Mon, 2004-03-29 at 15:10, Erik Hatcher wrote: > On Mar 29, 2004, at 7:51 AM, Eduardo Franceschi wrote: > > Until here everything works very fine. But I would like to generate > > i18n specific resources that include languages that use another > > character encoding like ISO-8859-1(like spanish and portuguese). > > So, when I try to use: > > > > /** > > * @struts.message locale="pt_BR" name="report" value="Relat�rio" > > */ > > > > XDoclet produces: > > > > report=Relatórios > > > > instead of > > > > report=Relat�rios > > > > > > Why ? Something I miss ? Bug ? > > > > I'm not sure if there are any XDoclet issues involved here, but how you > encode your .java files is crucial. Are you saving them as UTF-8 > encoding? You will need to do that at the very least. One fine point > here.... languages don't use character encodings.... just the > representation in bytes is encoded. > > Perhaps xjavadoc is not encoding aware?
It ought to be; originally there were two version of it built, one with Unicode support and one without (which was slightly faster). For some time now, though, it's only been doing the Unicode version; the speed wasn't that much slower, and it was less confusing than having to figure out which one to add to the classpath. > I mean, it would need to be > told what encoding to read .java files with, and I'm not sure what it > assumes currently, or if there is a way to switch it. That's more of an issue. The default for Readers is to use the platform's default encoding, regardless of what you used to write them with (as I've been finding out the hard way in some Chinese support stuff for Lucene I've been doing at work in the last couple of days!) However, xjavadoc.ant.XJavadocTask has a setEncoding(String) method that's commented "set source file charset", and DocletTask extends XJavadocTask (and all the others extend DocletTask). So, I reckon putting a encoding="ISO-8859-1" (or whatever) parameter on any doclet task (not subtask) ought to do the trick. I'm not 100% certain it'll work, though, as I seem to recall seeing some issue in JIRA about file encodings (and I can't remember if it was talking about source or generated files). Unfortunately, JIRA's search facility seems to be down at the moment, so I couldn't look it up. I guess the only way to find out is to try it ;-) Andrew. ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click _______________________________________________ xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user
