In Julia string literals, the backslash has special meaning so that you can add non-printable characters (such as the newline) or, include the double quote.
julia> print("The sun came over the horizon.\nHe said: \"Beautiful!\"")
The sun came over the horizon.
He said: "Beautiful!"
This is why using slash in a string literal is complex. So, to actually include a slash in your output string, you have to double it.
Anyway, I’d avoid eval and Meta.parse – it’s exceptionally rare you’d ever need to use them. I’ve been using Julia for years in some complicated works and have found only a few cases where Meta.parse and eval were indicated.
If the external source is not Julia code (e.g. you are reading the filename using read or from a file-picker prompt), then the user won’t need extra backslashes. Escaping is only needed when strings are entered literally in Julia code.
…in Julia code. The point is that when you have a string "...." in Julia code (a string literal), this is only a representation of the actual contents of the string, and is not the same as the string itself as it is stored in memory. A backslash in the underlying string is represented in Julia code by a string literal with an escaped (backslashed) backslash (a double backslash).
In the same way, if you want a string with a quotation mark, you need to represent it in Julia code with an escaped backslash: "a quote \" in a string". This is, in some sense, the origin of escaping: if you didn’t mark (escape) the quotation mark in some special way, Julia couldn’t distinguish it from the end of the string. But then once you settle on \" as the way to escape a quote ", then you need a way to escape the backslash itself.
Again, this is not specific to Julia. Every programming language has some version of string escaping.