Follow

Déjà Vu inserts a lot of backslashes in the imported text

In Déjà Vu, the backslash character is used as an Escape Character.

Escaping of characters in Déjà Vu

How are escaping characters used in Déjà Vu

Suppose that you have a file that contains text like this:

Sample text with {curly} brackets.

Déjà Vu uses the curly brackets to represent tags, so it cannot just insert that text into the project, or it would get confused by the curly brackets. To get around this problem, Déjà Vu uses a special character to denote that bracket that follows it is not to be treated as the beginning of a tag, but just as a character like any other.

The way Déjà Vu does this is by prefixing the curly bracket with a backslash. Therefore:

  1. { and } are the beginning and end of tags.
  2. \{ and \} are plain curly bracket characters that are not to be treated in a special way.

Thus, once this text is imported into a Déjà Vu project, it will look like this:

Sample text with \{curly\} brackets.

This is what is called "escaping a character" in Computer Science. Whenever you have "special characters", which are used to represent something other than themselves, there will likely be some other character that is used as an "escaping character". These are used whenever you need to process text that contains a special character, but you do not want the computer to treat it as a special character.

How to work with Déjà Vu's escaping characters

You should leave the backslashes where they are when you are translating. If Déjà Vu sees a \{ in the target text, it will replace it with a { during export, so you won't get a lot of backslashes peppered all over the exported document.

The backslash is itself a special character, so Déjà Vu will prefix each backslash it finds in the imported text with a backslash. Therefore, a \ in an imported document will become \\ in Déjà Vu.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk