Escaping is a method that allows us to tell a computer to do something special with the text we supply or to ignore the special funtion of a character. To tell the computer that it should expect an escape character we use a special escape marker, we usually make use of the backslash (\). So an escaped sequence consists of the escape marker folowed by another character.
Each escape sequence has a special meaning:
Escape Sequence | Effect | Description |
---|---|---|
\n | newline | Adds a newline at that place in the text |
\t | tab | Add a tab marker at that spot in the text |
\r | cariage return | Return without advancing the line |
print a real backslash | If you need a real backslash then you need to escape the backslash, the computer will only print one backslash | |
\” | ignore the " (quote) | Usually a double quote ends a string therefore by escaping the double quote the computer ignores the effetc of a closing double quote and thus the string continues. Eg ‘We \”helped\” him’ would be displayed as - We “helped” him |
\uxxxx | Unicode character | Sometime you want to refer to unicode characters using normal ASCII. Many programs and programmers use \u to refer to the Unicode character. Where xxxx is the hexidecimal or decimal value for the specific Unicode character. |
What you see | What it means | What you do |
---|---|---|
...server active.\nDo you want... | This is easy to recongnise as the newline appears between two sentences. When the program runs the sentences will appear on different lines. | The best option is to place your \n escape in the same place |
...jobs and/or\nOLE actions... | This is harder to recognise. There will be a line break between “and/or” and “OLE”. | Look at the structure of the whole translation, in a case like this the author is using newlines to balance the text (ie make the lines appear to be equal in length). If that is the case then balance your translations in a similar way. |