Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Weird characters tip
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
izomorfix
Tux's lil' helper
Tux's lil' helper


Joined: 18 Jun 2003
Posts: 81
Location: Romania

PostPosted: Mon Aug 04, 2003 10:24 am    Post subject: Weird characters tip Reply with quote

How many of you didn't cat a binary?
If you are like me you surely catted a lot of files so maybe you met the "weird characters problem": it is when a binary has some code that tweaks the term so it uses other mappings.
Here is the solution (just blindly type this):
Code:

cat
^O
^D

and you are saved :D
_________________
0100100100100000011011000110111101110110
0110010100100000010001110110010101101110
01110100011011110110111100100001
Back to top
View user's profile Send private message
zhenlin
Veteran
Veteran


Joined: 09 Nov 2002
Posts: 1361

PostPosted: Mon Aug 04, 2003 10:31 am    Post subject: Reply with quote

AMAZING.

Although this can be done this way too:

Code:

echo -en '\017'



Or just by

Code:

$'\017'


Of course, that is cheating, and relying on bash's willingness to output the name of the application that doesn't exist.

Or, if using text-mode console (not xterm),

Code:

reset
clear
Back to top
View user's profile Send private message
Garbz
Apprentice
Apprentice


Joined: 02 Jul 2003
Posts: 260
Location: Brisbane, Australia

PostPosted: Wed Aug 06, 2003 3:26 pm    Post subject: Reply with quote

:) I don't believe it. My way used to take ages. I used to either abandon the console or blindly shutdown -r now :)
_________________
Every begining is another begining's end.
Back to top
View user's profile Send private message
carambola5
Apprentice
Apprentice


Joined: 10 Jul 2002
Posts: 214
Location: Madtown, WI

PostPosted: Wed Aug 06, 2003 7:56 pm    Post subject: Reply with quote

izomorfix, you rock. lots.

I've noticed one difference, though. After cat'ing a zip file (on purpose to get the weird chars), and applying your fix, I get a block cursor rather than an underscore cursor. How would I change it back to an underscore cursor? It's just one of those things that will drive me insane.... though I suppose it's better than having an illegible console.
_________________
Get Firefox!

Proper Web Development

I'm done at 999.
Back to top
View user's profile Send private message
neuronal
Apprentice
Apprentice


Joined: 11 Feb 2003
Posts: 174
Location: Alicante/Spain

PostPosted: Wed Aug 06, 2003 8:16 pm    Post subject: Reply with quote

Pressing Ctrl+V Ctrl+O fix the problem too :)

Code:
┼␊┤⎼⎺┼▒┌@└␊├␊⎺⎼▒:·$ ^O
-␉▒⎽␤: : command not found
neuronal@meteora:~$


greetings
_________________
#!/Enrique/Barbeito/García ...
http://enrique.barbeito.org
Back to top
View user's profile Send private message
Victor Liu
n00b
n00b


Joined: 01 Aug 2003
Posts: 2

PostPosted: Wed Aug 06, 2003 9:32 pm    Post subject: something about vi Reply with quote

IIRC, `cat /usr/bin/vi` will also fix it. :)
Back to top
View user's profile Send private message
kram
n00b
n00b


Joined: 29 Nov 2002
Posts: 35

PostPosted: Fri Aug 08, 2003 6:00 am    Post subject: Re: something about vi Reply with quote

Victor Liu wrote:
IIRC, `cat /usr/bin/vi` will also fix it. :)

Is that supposed to be a joke? Cos I did it and my printer went crazy, started printing out all that garbage that usually comes up on the terminal, and it wouldn't wait until a page was used until it loaded the next page.... weird?

Also, aterm doesn't seem to have the weird characters problem :)
Back to top
View user's profile Send private message
izomorfix
Tux's lil' helper
Tux's lil' helper


Joined: 18 Jun 2003
Posts: 81
Location: Romania

PostPosted: Mon Aug 11, 2003 1:00 pm    Post subject: Reply with quote

Yo thanks carambola5.
I think you should check
[url]
http://ldp.kernelnotes.de/HOWTO/Framebuffer-HOWTO-5.html#ss5.9
[/url]
I think that in that zip there are some chars like the ones that change cursors 8) 8) 8)
_________________
0100100100100000011011000110111101110110
0110010100100000010001110110010101101110
01110100011011110110111100100001
Back to top
View user's profile Send private message
neurosis
Apprentice
Apprentice


Joined: 04 May 2003
Posts: 170
Location: Ottawa, Canada

PostPosted: Thu Apr 22, 2004 2:35 pm    Post subject: Reply with quote

Usually just typing 'reset' does it for me..
_________________
There is no evil greater than that committed by those who claim to do their deeds in the name of God.

-unknown
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum