You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-dev@jakarta.apache.org by Власов Игорь Олегович <vi...@openpower.ru> on 2006/03/24 08:05:25 UTC
Encoding of standart tag
The properties file in JSE5 tiger release read is ISO-8859-1 encoding. It
is too bad. We need a native2ascii procedure.
But we can store files in ANY encoding and then convert string to desired
encoding.
To do this I corrected file
org.apache.taglibs.standard.tag.common.fmt.MessageSupport
Line ~ 173
<<<<<
message = bundle.getString(key);
<<<<
>>>>
message = bundle.getString(key);
//!! THE ONLY ONE I NEED
try {
String
respEnc=this.pageContext.getResponse().getCharacterEncoding();
if (respEnc!=null&&!respEnc.equals("")){
message = new String(message.getBytes("ISO-8859-1"),
respEnc);
}
}
catch (UnsupportedEncodingException ex) {
}
>>>>
Can we incorporate this solution in Standard library ?