Kotlin - Form submission nature - Illegal escape: '\ f'
1 answer
Use unicode escape \u000C
. Kotlin doesn't support escape \f
. It is not widely used. - actually I didn't understand what Java is \f
until I see your question.
I made a table in Java and kotlin escape sequence:
Escape type | kotlin | java \ uXXXX yes yes \ XXX no yes // this is Java octal escape. \ t yes yes \ b yes yes \ n yes yes \ r yes yes \ f no yes \ 'yes yes \ "yes yes \\ yes yes \ $ yes no // Java just uses $
(Kotlin needs an escaped $ because string templates use $.)
+5
source to share