Backslash

Marc Worrell marc@REDACTED
Thu Mar 26 11:33:51 CET 2020


The last one returned what you want.

1> "\u".
"u"
2> "\\u".
"\\u"
3> [ $\\, $u ].
"\\u"

It show two ‘\’ characters because “\” is the escape character and it must be escaped.

- Marc


> On 26 Mar 2020, at 11:26, Vance Shipley <vances@REDACTED> wrote:
> 
> What is the magic to make this return "\u0080"?
> 
>    1> io_lib:fwrite("\u~4.16.0b", [128]). 
>    "u0080"
>    2> io_lib:fwrite("\\u~4.16.0b", [128]).
>    "\\u0080"
> 
> -- 
>      -Vance



More information about the erlang-questions mailing list