Dodo doc > Syntax > Literal Values > Text String Literals
Text string literals are enclosed in double quotes. They can be prefixed by an encoding specifier which tells the compiler which encoding to use for storing the text string. The character encoding of source files is set with the "enc" parameter of the compiler.
Some encoding specifiers are:
o" UTF-8
x" UTF-16LE little endian, e.g. Intel x86
X" UTF-16BE big endian, e.g. Sparc
L1" Latin-1
A" ASCII
Text string literals do not define an escape character. Special characters should be escaped outside the literal. An expression inside brackets after the final double quote or between two double-quotes is evaluated and added to the text string literal. Two double-quotes in succession insert a double quote in the text string.
Examples:
"blue" o"Café ""Fior""" "C:\Program files\NeoCo\startup"(extension)
Multi-line string literals open each line with a double quote. Each line of the multi-line literal ends with the last character of the line. The last line of the multi-line literal ends with a double quote.
Example:
"This continued " text ends " here."
Unlike regular text string literals, interpolated string literals can contain special characters escaped with a backslash "\". They are enclosed with single quotes. Inside an interpolated string literal the single-quote character must be escaped (\').
Examples:
'Ol\' castle on the hill' 'A\nB\nC'
Interpolated string literals cannot use an encoding specifier. A succession of interpolated string literals without a "+" operator between them are joined with newlines, which means 'A' 'B' 'C' is the same as 'A\nB\nC'.
An interpolated string literal can contain expressions enclosed with "${}" which are evaluated and inserted in the string.
Example:
'The ${colour} house'