Pipe ù NOT | why?
Hi
I am trying to learn how to use the Terminal, I am learning how to cat .txt files. I read that if the .txt file is large enough that it scrolls off the page you can pipe the output. Code:
cat doc.txt | more Mint 17 terminal this character ù is printed to screen, which of course will not work. If I use gedit 2.30.4 to type in cat doc.txt | more copy that and paste in Terminal this is what is pasted cat doc.txt ù more Can anyone tell me what I am doing wrong or where to go to read what I am doing wrong. Thanks |
Sounds like you have an incorrect keymap set up somewhere, but it's odd that it just happens in the terminal and not in gedit. Which terminal emulator are you using? Does it have a settings menu where you can select keyboard mapping?
BTW, in your case (just viewing a single file), you can simply type: Code:
more doc.txt Code:
less doc.txt |
Sounds like you might have either an incorrect keyboard layout or non-standard keymapping. I don't know what the UK keyboard layout gives for |, possibly | or perhaps something else. I know there are several keys that are different from the US layout, as are many other layouts. And it's also possible to map any key to practically any character.
|
Quote:
Thanks again |
Quote:
Where do I learn to map a key to a specific key? Thanks |
there are several ways, but first would be nice to know the real name of that terminal emulator.
|
Quote:
turns out there is a menuBar, its turned off by default and I did not check. OS is Mint 17 Cinnamon 64 bit |
in gnome terminal there is a menu Terminal->Set character encoding-> choose what you want or you can add additional sets
|
I don't run gnome, and I can't recall the keyboard mapping methods there. Google should find it, if your Google Foo is good enough.
|
I use GNOME Terminal on my system with the character encoding set to "Unicode (UTF-8)", and everything works well.
|
Since "|" is well in the first 127 ASCII characters, most likely the terminal is set to use stuff like UTF-16 or some weird encoding.. Switch anything you find in the terminal emulator settings about character encoding to UTF-8 (as someone already said above) and everything should work again... Weird that this happend by default...
|
On uk quatry keyboard pipe is above the \ symbol; on a us keyboard layout(software
) it is often elsewhere, especialy if the pc is meant for the uk. You could try pluging in a USB keyboard and see if that gives you different results. The pipe key results seems to differ more than most. Fred. |
1 Attachment(s)
Could it be due to the font?
I have gnome terminal 3.4.1.1 in which I can select the display font (in the menu, Edit -> Profile Preferences, then select the General tab). Currently a check box is checked to "Use the system fixed width font." If I uncheck that, I can select another font. If I wished to change it, I would choose a monospace font. Courier is a monospace font. Other monospace fonts usually have "Mono" in the name. Since you know it displays correctly in gedit, you should also inspect which font is used in gedit (in the gedit 3.4.2 menu, Edit -> Preferences, then select the Font & Colors tab). In my gedit preferences, the checkbox for "Use the system fixed width font (Monospace 11)" is checked. If I uncheck it, I can choose another font. By the way, the title of your thread reminds me of this painting: Attachment 16492The Treachery of Images, by René Magritte in which it is written "This is not a pipe." (click on image to magnify it) Source: http://en.wikipedia.org/wiki/The_Treachery_of_Images |
All times are GMT -5. The time now is 06:01 PM. |