cut() does not handle unicode properly

Bug #1414316 reported by Ron Johnson
This bug report is a duplicate of:  Bug #875713: cut fails to handle correctly utf-8. Edit Remove
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
coreutils (Ubuntu)
New
Undecided
Unassigned

Bug Description

Hi,

$ echo 哈哈
哈哈

$ echo 哈哈 | cut -c 2-
��哈

Apparently, Red Hat patched this in or before FC15.
http://unix.stackexchange.com/questions/15961/coreutils-that-are-utf-aware
[patches@holocene ~]$ rpm -q coreutils
coreutils-8.10-2.fc15.x86_64
[patches@holocene ~]$ echo 哈哈 | cut -c 2-

The patch is here: http://pkgs.fedoraproject.org/cgit/coreutils.git/tree/coreutils-i18n.patch?id=6e10f376996b64f538259091a524df2249b653fb;id2=HEAD

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: coreutils 8.21-1ubuntu5.1
ProcVersionSignature: Ubuntu 3.13.0-44.73-generic 3.13.11-ckt12
Uname: Linux 3.13.0-44-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.14.1-0ubuntu3.6
Architecture: amd64
CurrentDesktop: XFCE
Date: Sat Jan 24 10:06:25 2015
InstallationDate: Installed on 2013-05-22 (611 days ago)
InstallationMedia: Xubuntu 13.04 "Raring Ringtail" - Release amd64 (20130423.1)
SourcePackage: coreutils
UpgradeStatus: Upgraded to trusty on 2015-01-04 (19 days ago)

Revision history for this message
Ron Johnson (ron-l-johnson) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.