`:put` won't HEX-escape the characters it cannot print. Some examples are below.
JavaScript has a JSON.stringify for this (example at http://stackoverflow.com/questions/2167 ... 2#21672392)
Is there such a function for the Scripting engine?
Code: Select all
:put "a\00b"
ab
:put "a\01b"
ab
:put "a\02b"
ab
:put "a\03b"
ab
:put "a\04b"
ab
:put "a\05b"
ab
:put "a\06b"
ab
:put "a\07b"
ab
:put "a\08b"
b
:put "a\09b"
a b
:put "a\10b"
ab
:put "a\11b"
ab
:put "a\12b"
ab
:put "a\13b"
ab
:put "a\14b"
ab
:put "a\15b"
ab
:put "a\16b"
ab
:put "a\17b"
ab
:put "a\18b"
ab
:put "a\19b"
ab
:put "a\20b"
a b
:put "a\FFb"
a?b
:put "a\FEb"
a?b
:put "a\FDb"
a?b
:put "a\F0b"
a?b
:put "a\E0b"
a?b
:put "a\D0b"
a?b
:put "a\C0b"
a?b
:put "a\B0b"
a?b
:put "a\A0b"
a?b
:put "a\90b"
a?b
:put "a\80b"
a?b
:put "a\70b"
apb
Code: Select all