{{ message }}

# Scala 2.10 String Interpolation inside a multiline String with backslash#6631

Closed
opened this issue Nov 8, 2012 · 14 comments
Closed

# Scala 2.10 String Interpolation inside a multiline String with backslash#6631

opened this issue Nov 8, 2012 · 14 comments
Assignees
Labels
Milestone

### scabug commented Nov 8, 2012

 Santosh Gokak (santoshgokak) said: What about the second case? That just returns complete gibberish.

### scabug commented Nov 8, 2012

 @paulp said: It's not gibberish; it's what you get when you interpret \f as a form feed, like it is in a single quoted string. Try "c:\foo\bar\fileName.csv" in the repl.

### scabug commented Nov 8, 2012

 @Ichoran said: Even more reduced: s"\" String interpolation treats everything as a raw string. (But the escape parser is buggy.)

### scabug commented Nov 8, 2012

 @paulp said: Whoa. You're telling me it's intentional that """\t""" and s"""\t""" Get me one string with a tab and one with a \t ? I can't believe anyone thought that was a good idea.

### scabug commented Nov 8, 2012

 @Ichoran said: I'm not sure what s"""\t""" ought to do. The format specifier says it's simply formatted as opposed to raw, i.e. raw"""\t""" or raw"\t". But the triple quotes say it's raw. In case of ambiguity, you will find a life jacket under the seat in front of you. The person to your right, however, should use their seat cushion as a floatation device. It's simple enough to fix the bug (note: octal parsing is buggy also), but the correct behavior is nonobvious without a nontrivial change to something.

### scabug commented Dec 6, 2012

closed this Dec 6, 2012
added this to the 2.10.1 milestone Apr 7, 2017
mentioned this issue Apr 7, 2017
mentioned this issue Apr 7, 2017