# Opening and reading text: why does Julia insert many "\\"

**URL:** <https://discourse.julialang.org/t/opening-and-reading-text-why-does-julia-insert-many/38731>\
**Category:** New to Julia\
**Tags:** question\
**Created:** [May 4, 2020, 10:18am UTC](https://discourse.julialang.org/t/opening-and-reading-text-why-does-julia-insert-many/38731 "2020-05-04T10:18:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nash](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nash/32/14482_2.png) [@Nash](https://discourse.julialang.org/u/Nash)\
**Post date:** [May 4, 2020, 10:18am UTC](https://discourse.julialang.org/t/opening-and-reading-text-why-does-julia-insert-many/38731/1 "2020-05-04T10:18:14Z")

</div>

I have a .txt file (the image below shows a snippet):

 ![whyinsert](https://global.discourse-cdn.com/julialang/original/3X/0/f/0f218b3d0fc850cb34bd99945367b9f7e8bcbeca.jpeg)

Unfortunately, when I open the file, and read it, Julia inserts many " \ " and I have no idea why

 ![whyinsertII](https://global.discourse-cdn.com/julialang/original/3X/7/0/700422b51b7f63a4b14c5bb6863be9526ee4ed07.jpeg)

Why does Julia insert " \ " and how can that be avoided?

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [May 4, 2020, 10:26am UTC](https://discourse.julialang.org/t/opening-and-reading-text-why-does-julia-insert-many/38731/2 "2020-05-04T10:26:56Z")

</div>

It’s just printed in the format you would enter it, with escapes (otherwise the `"` would terminate the string, so it has to be `\"`).

Incidentally, please don’t post screenshots, but quote code instead.

> [@Please read: make it easier to help you](https://discourse.julialang.org/t/psa-make-it-easier-to-help-you/14757/):
>
> Welcome to the Julia Discourse! We are enthusiastic about helping Julia programmers, both beginner and experienced. This public service announcement (PSA) outlines best practices when asking for help. Following these points makes it easier for us to help you and more likely you’ll get a prompt, useful answer. Keywords are highlighted to make it easier to refer to specific points. Choose a descriptive title that captures the key part of your question, eg “plots with multiple axes” instead of …

---

<div class="post-metadata">

**Author:** ![oheil](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oheil/32/220745_2.png) [@oheil](https://discourse.julialang.org/u/oheil)\
**Post date:** [May 4, 2020, 10:28am UTC](https://discourse.julialang.org/t/opening-and-reading-text-why-does-julia-insert-many/38731/3 "2020-05-04T10:28:59Z")

</div>

This looks like JSON, check for the JSON.jl package.

---

<div class="post-metadata">

**Author:** ![tlienart](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tlienart/32/7640_2.png) [@tlienart](https://discourse.julialang.org/u/tlienart)\
**Post date:** [May 4, 2020, 10:55am UTC](https://discourse.julialang.org/t/opening-and-reading-text-why-does-julia-insert-many/38731/4 "2020-05-04T10:55:51Z")

</div>

> [@Tamas\_Papp](#):
>
> It’s just printed in the format you would enter it, with escapes (otherwise the `"` would terminate the string, so it has to be `\"` ).

Also if you do `println(target)` you’ll see that the printout does not have these `\`.
