DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=30297>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=30297 fmt strips quotes when using parameter [EMAIL PROTECTED] changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID ------- Additional Comments From [EMAIL PROTECTED] 2004-07-23 17:10 ------- It may seem surprising, but it works as defined in the spec. What's happening is that the existence of a format parameter is causing the tag to use MessageFormat to process the message. Check out sections 8.8 <fmt:message> and 8.9 <fmt:param> of the spec, as well as the JavaDoc for java.text.MessageFormat. Here's some test code to illustrate the effect: import java.text.*; import java.util.*; public class FmtTest { public static class Messages extends ListResourceBundle { private static final Object[][] CONTENTS = { {"feedback2", "Rock'n Roll"}, {"feedback2-xtra-quote", "Rock''n Roll"} }; protected Object[][] getContents() { return CONTENTS; } } public static void main(String[] args) { ResourceBundle bundle = ResourceBundle.getBundle("FmtTest$Messages"); String feedback2 = bundle.getString("feedback2"); String feedback2XtraQuote = bundle.getString("feedback2-xtra-quote"); System.out.println("feedback2:"); System.out.println(feedback2); System.out.println(MessageFormat.format(feedback2, null)); System.out.println(); System.out.println("feedback2-xtra-quote:"); System.out.println(feedback2XtraQuote); System.out.println(MessageFormat.format(feedback2XtraQuote, null)); } } This will output: feedback2: Rock'n Roll Rockn Roll feedback2-xtra-quote: Rock''n Roll Rock'n Roll --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]