Hi Wojtek

This limitation only extends to all "text i/o" contexts, you can freely read (rd with 'cnt argument) and write (wr) NULL with raw binary i/o functions. When reading text with (read), (from), (till), (line) and friends, the data is automatically turned into picolisp symbols (as it is the picolisp type to represent strings), and as they cannot handle NULL it is interpreted as EOF.

Cheers,
beneroth


Am 2019-06-25 14:58, schrieb Wojciech Gac:
Hi Alex,

I see. Thanks for the response

I'm wondering then... what if someone wanted to use PicoLisp to emit
characters somewhere (say, to a listening process) and the case
required one to send a null byte. Does this limitation extend to all
attempts at representing the null byte or only  in the file context?

Cheers,
Wojtek

wt., 25 cze 2019 o 13:54 Alexander Burger <a...@software-lab.de>
napisał(a):

Hi Wojtek,

I've noticed this when messing around with my .emacs file. When
you have a
file with a null character somewhere within a double-quoted string
(e.g. "\0") and you try to insert it into the current buffer with
:r, then
it breaks Vip

Right, this is a limitation of Vip (and PicoLisp in general): It can
handle only
files with non-null characters in UTF-8 encoding.

Characters in PicoLisp are symbols, and a null-byte works as a name
terminator
(similar to C), so symbols cannot have names with null-bytes.

☺/ A!ex

--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to