|
From: Paul L. <pa...@ac...> - 2004-06-28 13:11:08
|
Dear jEditters,
I got surprised today, that the encoding of Templates of the templates
plugin is actually, simply, the default platform encoding!
This looks pretty bad and is, of course, entirely, incompatible with
the usage of Unicode charsets in templates.
I have modified TemplateFile.java as follows so that it is loaded in
UTF-8 always... here is the change.
I am not sure wether there should be a better way, but I think it's
good practice to use UTF-8 as default encoding in general.
public BufferedReader getBufferedReader() throws FileNotFoundException
{
try {
return new BufferedReader(new InputStreamReader(new
FileInputStream(this.templateFile),"UTF-8"));
} catch (UnsupportedEncodingException ex) {
return new IllegalStateException("Can't open UTF-8, real bad!");
}
}
thanks
paul
|