Weird bug? Piping text to cat alters it (bash works fine)
13 views
Skip to first unread message
Nick Demou
unread,
Jan 12, 2018, 8:00:43 AM1/12/18
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to xonsh
This is really weird:
$ echo αβγδ | cat # αβγδ are Greek letters αβγδ # SAY WHAT??? $ bash -c 'echo αβγδ | cat' αβγδ # AS EXPECTED
Of course I'm not piping texts to cat but the same happens when cating files with Greek text.
FWIW using hexdump I see it gets different bytes when cat is involved:
$ echo αβγδ | hexdump -C 00000000 ce b1 ce b2 ce b3 ce b4 0a |.........| 00000009 $ echo αβγδ | cat | hexdump -C 00000000 c3 8e c2 b1 c3 8e c2 b2 c3 8e c2 b3 c3 8e c2 b4 |................| 00000010 0a |.| 00000011
Nick Demou
unread,
Jan 14, 2018, 3:27:04 AM1/14/18
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to xonsh
I'm about to switch laptops so I tested on the new one and everything worked just fine. I'll leave it at that since on my old laptop I've gone wild with pip and pip3 and it has become a mess.
Τη Παρασκευή, 12 Ιανουαρίου 2018 - 3:00:43 μ.μ. UTC+2, ο χρήστης Nick Demou έγραψε:
This is really weird:
$ echo αβγδ | cat # αβγδ are Greek letters αβγδ # SAY WHAT??? $ bash -c 'echo αβγδ | cat' αβγδ # AS EXPECTED