#992667 /usr/bin/cut: -c doesn't seem to actually take characters?

Package:
coreutils
Source:
coreutils
Description:
GNU core utilities
Submitter:
наб
Date:
2026-05-25 17:41:02 UTC
Severity:
normal
Tags:
#992667#5
Date:
2021-08-22 01:14:34 UTC
From:
To:
Dear Maintainer,

Consider, in a UTF-8 locale:
	$ printf 'яйцо\nЯЙЦО' | cut -c 1,3-
What would you expect? I'd expect
	яцо
	ЯЦО
but GNU cut gives me
	�йцо
	�ЙЦО
or, rather,
	00000000  d1 d0 b9 d1 86 d0 be 0a  d0 d0 99 d0 a6 d0 9e 0a  |................|
	00000010
which, if you compare it with the source string:
	00000000  d1 8f d0 b9 d1 86 d0 be  0a d0 af d0 99 d0 a6 d0  |................|
	00000010  9e                                                |.|
	00000011
seems to actually be dropping the second byte,
instead of the second character. Odd!

Best,
наб

#992667#10
Date:
2026-02-04 15:37:48 UTC
From:
To:
This still occurs. One gets incorrect output with a zero exit status.
The output may or may not contain invalid UTF-8 sequences.