anallg Posted September 29, 2009 Share Posted September 29, 2009 Hi,I trying to define a text with line feed in my .properties resource file. The guide indicates to put \ but it doesn´t work. Thanks in advance. Link to comment Share on other sites More sharing options...
mdahlman Posted September 29, 2009 Share Posted September 29, 2009 anallg, It's not clear what guide you are referring to. A carriage return in a Java properties file is the java line feed \n (that's backslash + n in case the forum mangles it) but it needs to be escaped. So you need to use \\n (that's backslash + backslash + n) Regards,Matt Link to comment Share on other sites More sharing options...
jason.ferens Posted January 6, 2015 Share Posted January 6, 2015 Hi Matt, just tested this and it's not working. The output is "value \n valuethatshouldbeonasecondline" Link to comment Share on other sites More sharing options...
jason.ferens Posted January 6, 2015 Share Posted January 6, 2015 I figured it out :) You have to escape the html break character like this "<br>" Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now