Convert a unicode string to its javascript-escaped representation.