From fdf176960fee2f2ee2e20c92d1b2d1e3363cf5ce Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Fri, 30 Mar 2018 10:42:57 -0700 Subject: doc: null char in str out stream: incorrect. * txr.1: The described behavior regarding null bytes output into string output streams is incorrect. In fact they are effectively dropped by the put-char operation. Let's not commit to any specific behavior. Also mention pseudo-null. --- txr.1 | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/txr.1 b/txr.1 index fdf6bc9d..ecfe3219 100644 --- a/txr.1 +++ b/txr.1 @@ -43054,10 +43054,14 @@ The .code get-string-from-stream function is used to retrieve the accumulated string. -If the null character is written to a string output stream, either via -a character output operation or as a byte operation, the resulting string -will appear to be prematurely terminated. \*(TX strings cannot contain null -bytes. +If the null character is written to a string output stream, the behavior +is unspecified. \*(TX strings cannot contain null bytes. A the pseudo-null +character +.codn #\exDC00 , +also notated +.codn #\epnul , +will produce a null byte when converted to UTF-8 and thus serves as an +effective internal representation of the null character in external data. .coNP Function @ get-string-from-stream .synb -- cgit v1.2.3