# If you want your value to include a \, it should be escaped by another \. path = c:\\wiki\\templates # This means that if the number of \ at the end of the line is even, the next line is not included in the value. # In the following example, the value for "evenKey" is "This is on one line\". evenKey = This is on one line\\ # This line is a normal comment and is not included in the value for "evenKey" # If the number of \ is odd, then the next line is included in the value. # In the following example, the value for "oddKey" is "This is line one and\#This is line two". oddKey = This is line one and\\\ # This is line two # White space characters are removed before each line. # Make sure to add your spaces before your \ if you need them on the next line. # In the following example, the value for "welcome" is "Welcome to Wikipedia!". welcome = Welcome to \ Wikipedia! # If you need to add newlines and carriage returns, they need to be escaped using \n and \r respectively. # You can also optionally escape tabs with \t for readability purposes. valueWithEscapes = This is a newline\n and a carriage return\r and a tab\t. # You can also use Unicode escape characters (maximum of four hexadecimal digits). # In the following example, the value for "encodedHelloInJapanese" is "こんにちは". encodedHelloInJapanese = \u3053\u3093\u306b\u3061\u306f # But with more modern file encodings like UTF-8, you can directly use supported characters. helloInJapanese = こんにちは In the example above, (line 5) would be a key, and its corresponding value would be . While the number sign (#) and the exclamation mark (!) marks text as comments, it has no effect when it is part of a property. Thus, the key (line 37) has the value and not ! All of the whitespace in front of line 38 is excluded. Before Java 9, the encoding of a .properties file is ISO-8859-1, also known as Latin-1. All non-ASCII characters must be entered by using Unicode escape characters, e.g. \uHHHH where HHHH is a hexadecimal index of the character in the Unicode character set. This allows for using .properties files as resource bundles for localization. A non-Latin-1 text file can be converted to a correct .properties file by using the native2ascii