bug#53145: 回覆: Re: bug#53145: "cut" can't segment Chinese characters correctly?

2022-01-09 Thread zendas via GNU coreutils Bug Reports
zendas@Backup-Server:/tmp$ echo "你好啊" | cut -c 1-3 | od -b 000 344 275 240 012 004 zendas@Backup-Server:/tmp$ echo "你好啊" | cut -c 1 | od -b 000 344 012 002 zendas@Backup-Server:/tmp$ echo "你好啊" | cut -b 1 | od -b 000 344 012 002 zendas@Backup-Server:/tmp$ echo "你好啊" | cut

bug#53145: "cut" can't segment Chinese characters correctly?

2022-01-09 Thread zendas via GNU coreutils Bug Reports
Create a new test2.txt, the content is 星期一 星期二 星期三 星期四 星期五 星期六 星期日 = zendas@Backup-Server:/tmp$ cat test2.txt 星期一 星期二 星期三 星期四 星期五 星期六 星期日 zendas@Backup-Server:/tmp$ = zendas@Backup-Server:/tmp$ cut -c 1 test2.txt � � � � � � �

bug#53145: "cut" can't segment Chinese characters correctly?

2022-01-09 Thread Bob Proulx
zendas wrote: > Hello, I need to get Chinese characters from the string. I googled a > lot of documents, it seems that the -c parameter of cut should be > able to meet my needs, but I even directly execute the instructions > on the web page, and the result is different from the > demonstration. I