<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>87429</bug_id>
          
          <creation_ts>2005-03-31 08:52 0000</creation_ts>
          <short_desc>coreutils-5.2.1-r5 uses old i18n patch, cut -f1 fails with wide chars</short_desc>
          <delta_ts>2005-05-19 13:19:47 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Core system</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>zlynx@acm.org</reporter>
          <assigned_to>base-system@gentoo.org</assigned_to>
          <cc>mmokrejs@ribosome.natur.cuni.cz</cc>

      

      
          <long_desc isprivate="0">
            <who>zlynx@acm.org</who>
            <bug_when>2005-03-31 08:52:44 0000</bug_when>
            <thetext>In cut_fields_mb in cut.c, wint_t wc is not initialized before being
compared to WEOF.  It just so happens that when I compile it on my
system, through some miracle of perversity and stack layout, wc picks up
-1 as its initial value.

On cut.c line 836, change wint_t wc; to wint_t wc = 0;  That fixes it
for me.

On the coreutils bug list I was told that this problem has already been fixed in Fedora Core 3 a while ago.  Maybe Gentoo&apos;s coreutils needs to get new versions of the i18n patch?

Reproducible: Always
Steps to Reproduce:
1.  Emerge coreutils with at least -O2 and gcc 3.4 or 4.0
Actual Results:  
echo foo:bar | cut -d: -f1 produces no output!

Expected Results:  
foo</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2005-04-01 20:31:19 0000</bug_when>
            <thetext>5.2.1-r6 has the updated redhat patch</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>zlynx@acm.org</who>
            <bug_when>2005-04-04 08:51:34 0000</bug_when>
            <thetext>*** Bug 86352 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2005-05-19 11:04:37 0000</bug_when>
            <thetext>*** Bug 93234 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>foser@gentoo.org</who>
            <bug_when>2005-05-19 13:19:47 0000</bug_when>
            <thetext>*** Bug 86352 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
      
    </bug>

</bugzilla>