Adventures in Software Engineering
Friday, June 10, 2011
ResourceBundles and special characters
Seems that some special characters when used in a ResourceBundle proper file will throw off the parser for substitution. These characters need to be escaped properly, the escape notation is as follows:
The special chars \', { and }:
escape ' with another '
''
(double-single quote)
escape \ with another \
\\
(double backslash)
enclose } with '
'}'
enclose { with '
'{'
See also:
http://struts.apache.org/2.0.14/docs/how-to-escape-special-chars-in-resource-bundles.html
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)