POSIX defines behavior when sending NUL to the terminal?

Here is a Perl program that sends an ASCII NUL as output:

print "hello\0world"

And here's how to run such a program from shor bash:

perl -e 'print "hello\0world"'

On Mac OS X 10.11.2, this produces visible output:

helloworld

However, is this behavior compatible for all POSIX compatible terminal emulators? (Unlike, for example, printing NUL as a new line or crashing?)

+4
source share
1 answer

, ; chepner , POSIX . , ECMA- 48, , .

, ( U+0000 ).


, ECMA-48 ( ANSI - , , ANSI-) NUL:

8.3.88 NUL - NULL
: (C0) : 00/00

NUL . NUL , , / .

, ANSI, NUL - ( NUL ), , ECMA-48, .

+4

Source: https://habr.com/ru/post/1629585/


All Articles