[MacPorts] #20686: gsed fails to handle non-ASCII characters (bytes with top-bit set) in C locale
#20686: gsed fails to handle non-ASCII characters (bytes with top-bit set) in C locale ---------------------------------+------------------------------------------ Reporter: vinc17@… | Owner: nox@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.7.1 Keywords: | Port: gsed ---------------------------------+------------------------------------------ For instance: {{{ $ echo "abécd" | LC_ALL=C gsed -e 's/.*//' écd }}} With the sed from Mac OS X and GNU sed under GNU/Linux, one gets a blank line, thus I suppose that this is what the user expects even though é isn't part of the US-ASCII character set specified by the C locale (and even though the result could depend on the encoding with some expressions). The consequence is that building ocaml fails if gsed is installed with the with_default_names variant (see bug #20275). -- Ticket URL: <http://trac.macports.org/ticket/20686> MacPorts <http://www.macports.org/> Ports system for Mac OS
#20686: gsed fails to handle non-ASCII characters (bytes with top-bit set) in C locale ---------------------------------+------------------------------------------ Reporter: vinc17@… | Owner: nox@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.7.1 Keywords: | Port: gsed ---------------------------------+------------------------------------------ Comment(by nox@…): I don't get an empty line with Mac OS X sed: {{{ Bellcross:~ nox$ which sed gsed /usr/bin/sed /opt/local/bin/gsed Bellcross:~ nox$ echo "abécd" | LC_ALL=C sed -e 's/.*//' écd Bellcross:~ nox$ echo "abécd" | LC_ALL=C gsed -e 's/.*//' écd }}} -- Ticket URL: <http://trac.macports.org/ticket/20686#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#20686: gsed fails to handle non-ASCII characters (bytes with top-bit set) in C locale ---------------------------------+------------------------------------------ Reporter: vinc17@… | Owner: nox@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.7.1 Keywords: | Port: gsed ---------------------------------+------------------------------------------ Comment(by vinc17@…): That's strange. I have Mac OS X 10.4.11. If you have Leopard, perhaps Apple introduced a bug. -- Ticket URL: <http://trac.macports.org/ticket/20686#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#20686: gsed fails to handle non-ASCII characters (bytes with top-bit set) in C locale ---------------------------------+------------------------------------------ Reporter: vinc17@… | Owner: nox@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.7.1 Keywords: | Port: gsed ---------------------------------+------------------------------------------ Comment(by vinc17@…): BTW, does bug #20275 occur on your machine? -- Ticket URL: <http://trac.macports.org/ticket/20686#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#20686: gsed fails to handle non-ASCII characters (bytes with top-bit set) in C locale ---------------------------------+------------------------------------------ Reporter: vinc17@… | Owner: nox@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.7.1 Keywords: | Port: gsed ---------------------------------+------------------------------------------ Comment(by nox@…): I don't use +with_default_names. -- Ticket URL: <http://trac.macports.org/ticket/20686#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS
#20686: gsed fails to handle non-ASCII characters (bytes with top-bit set) in C locale ---------------------------------+------------------------------------------ Reporter: vinc17@… | Owner: nox@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.7.1 Keywords: | Port: gsed ---------------------------------+------------------------------------------ Comment(by vinc17@…): Yes, but even without +with_default_names (or without gsed installed), you should probably reproduce the bug because your Mac OS X sed is buggy too. -- Ticket URL: <http://trac.macports.org/ticket/20686#comment:6> MacPorts <http://www.macports.org/> Ports system for Mac OS
#20686: gsed fails to handle non-ASCII characters (bytes with top-bit set) in C locale ---------------------------------+------------------------------------------ Reporter: vinc17@… | Owner: nox@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.7.1 Keywords: | Port: gsed ---------------------------------+------------------------------------------ Comment(by russ.bubley@…): I encounterd this problem too. For me (on Tiger) {{{ #!sh machine:~/bin user$ which sed gsed /usr/bin/sed /opt/local/bin/gsed machine:~/bin user$ echo "ab\303\251cd" | LC_ALL=C sed -e 's/.*//' machine:~/bin user$ echo "ab\303\251cd" | LC_ALL=C gsed -e 's/.*//' écd }}} -- Ticket URL: <http://trac.macports.org/ticket/20686#comment:7> MacPorts <http://www.macports.org/> Ports system for Mac OS
#20686: gsed fails to handle non-ASCII characters (bytes with top-bit set) in C locale ---------------------------------+------------------------------------------ Reporter: vinc17@… | Owner: nox@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.7.1 Keywords: | Port: gsed ---------------------------------+------------------------------------------ Comment(by jmr@…): Has this been reported upstream? -- Ticket URL: <https://trac.macports.org/ticket/20686#comment:8> MacPorts <http://www.macports.org/> Ports system for Mac OS
#20686: gsed fails to handle non-ASCII characters (bytes with top-bit set) in C locale ---------------------------------+------------------------------------------ Reporter: vinc17@… | Owner: nox@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.7.1 Keywords: | Port: gsed ---------------------------------+------------------------------------------ Comment(by vinc17@…): Replying to [comment:8 jmr@…]:
Has this been reported upstream?
Yes: [http://www.archivum.info/bug-gnu-utils@gnu.org/2009-08/00078/sed- fails-to-handle-bytes-with-top-bit-set-in-C-locale-under-Mac-OS-X.html sed fails to handle bytes with top-bit set in C locale under Mac OS X] -- Ticket URL: <https://trac.macports.org/ticket/20686#comment:9> MacPorts <http://www.macports.org/> Ports system for Mac OS
#20686: gsed fails to handle non-ASCII characters (bytes with top-bit set) in C locale ---------------------------------+------------------------------------------ Reporter: vinc17@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.7.1 Keywords: | Port: gsed ---------------------------------+------------------------------------------ Changes (by jmr@…): * owner: nox@… => macports-tickets@… Comment: -> nomaintainer -- Ticket URL: <https://trac.macports.org/ticket/20686#comment:10> MacPorts <http://www.macports.org/> Ports system for Mac OS
#20686: gsed fails to handle non-ASCII characters (bytes with top-bit set) in C locale -----------------------+---------------------------- Reporter: vinc17@… | Owner: mschamschula@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.7.1 Resolution: | Keywords: Port: gsed | -----------------------+---------------------------- Changes (by mf2k@…): * owner: macports-tickets@… => mschamschula@… -- Ticket URL: <https://trac.macports.org/ticket/20686#comment:11> MacPorts <http://www.macports.org/> Ports system for OS X
#20686: gsed fails to handle non-ASCII characters (bytes with top-bit set) in C locale -----------------------+---------------------------- Reporter: vinc17@… | Owner: mschamschula@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.7.1 Resolution: | Keywords: Port: gsed | -----------------------+---------------------------- Comment (by mschamschula@…): This ticket can be closed. With the current version of gsed, @4.2.2, I get the expected empty line (Tested on OS X 10.5.8 and 10.9.4). -- Ticket URL: <https://trac.macports.org/ticket/20686#comment:13> MacPorts <http://www.macports.org/> Ports system for OS X
#20686: gsed fails to handle non-ASCII characters (bytes with top-bit set) in C locale -------------------------+---------------------------- Reporter: vinc17@… | Owner: mschamschula@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 1.7.1 Resolution: worksforme | Keywords: Port: gsed | -------------------------+---------------------------- Changes (by mf2k@…): * status: new => closed * resolution: => worksforme -- Ticket URL: <https://trac.macports.org/ticket/20686#comment:14> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts