start

# Escaping

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.

## Types of Escape Charaters

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.

## Escape Characters in Your Translations

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.

## Dos and Don'ts

- DO
  - Copy the escape exactly as you see it. In some of the Translate Toolkit programs there is a bug that uses \\n instead of \n. Make sure you also use \\n
  - Move the placement of escapes if they are being used to balance sentences
  - Make sure you have esactly the same number of escapes as in the original
  - Drop \” or \’ escapes if your language does not use the “double” or ‘single’ quote method of emphasis that English uses. Be aware that the doublequote and singlequote tests of pofilter will no longer be useful.
  - Place " or ' around the same concept as the English ie around the same word or words that the English had surrounded.

- DONT
  - Change the escape in any way. Do not use /n instead of \n just because you can’t find \ on your keyboard
  - Confuse sentences like this “File \ Open \ New” as an escape. If they are not in the above list then they are most likely not escape characters.
  - Add or delete spaces around the escape. If its there keep it, if not don’t add it.