On this page:
write-string-as-bytes

7 idiocket/port

procedure

(write-string-as-bytes txt [o])  exact-nonnegative-integer?

  txt : string?
  o : output-port? = (current-output-port)
Equivalent to (write-bytes (string->bytes/utf-8 txt) o).