(no subject)
Jul. 2nd, 2021 06:04 pm$ export F=`printf "\xff\xfe\xfd"`
$ python3 -c 'import os; print(repr(os.environ["F"]))'
'\udcff\udcfe\udcfd'
$ python3 -c 'import os; print(os.environ["F"].encode())'
Traceback (most recent call last):
File "", line 1, in
UnicodeEncodeError: 'utf-8' codec can't encode characters in position 0-2: surrogates not allowed
зачем ловить медведя, если потом он тебя не отпустит?
$ python3 -c 'import os; print(repr(os.environ["F"]))'
'\udcff\udcfe\udcfd'
$ python3 -c 'import os; print(os.environ["F"].encode())'
Traceback (most recent call last):
File "
UnicodeEncodeError: 'utf-8' codec can't encode characters in position 0-2: surrogates not allowed
зачем ловить медведя, если потом он тебя не отпустит?