Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > Special characters typing problem in Terminal

Special characters typing problem in Terminal
Thread Tools
Fresh-Faced Recruit
Join Date: Sep 2007
Status: Offline
Reply With Quote
Sep 11, 2007, 09:13 AM
 
Hello everybody,

looking for an answer how to solve this problem. I am trying to learn at least basics of Unix but can't enter special symbols like tilde or pipe. My macbook with a Tiger has a german keyboard and there are no problems to type any symbol everywhere (tilde ~ shortcut Alt+N, pipe | shortcut Alt+7 and so on) except Terminal. When I press for example Alt+N instead of pipe I get a ":", when I press Alt+N I get the same. Any ideas how to solve it. You help is highly appreciated. Thx!

V.
     
Mac Elite
Join Date: Apr 2000
Location: Los Angeles, CA
Status: Offline
Reply With Quote
Sep 12, 2007, 04:41 PM
 
This is what's worked for me:

1. Create/add to the file .inputrc in your home directory (~/.inputrc)
Code:
echo "set meta-flag on" >> ~/.inputrc echo "set input-meta on" >> ~/.inputrc echo "set output-meta on" >> ~/.inputrc echo "set convert-meta off" >> ~/.inputrc
2. Create/add to the file .bash_profile in your home directory (~/.bash_profile)
Code:
echo "export LC_CTYPE=en_US.UTF-8" >> ~/.bash_profile echo "export LANG=en_US.UTF-8" >> ~/.bash_profile
3. Make sure that the "Use option key as meta key" in Terminal > Window Settings > Keyboard is disabled/unchecked.
     
trolis  (op)
Fresh-Faced Recruit
Join Date: Sep 2007
Status: Offline
Reply With Quote
Sep 13, 2007, 09:13 AM
 
Thx a lot for your answer! Finally it works, but how to get rid of this message:
-bash: {rtf1macansicpg10000cocoartf824cocoasubrtf420: command not found
-bash: /Users/Vi/.bash_profile: line 2: syntax error near unexpected token `}'
-bash: /Users/Vi/.bash_profile: line 2: `{\fonttbl\f0\fnil\fcharset77 Monaco;}'
Any suggestions?
(Last edited by trolis; Sep 13, 2007 at 09:39 AM. )
     
Mac Elite
Join Date: Apr 2000
Location: Los Angeles, CA
Status: Offline
Reply With Quote
Sep 13, 2007, 12:48 PM
 
From the looks of it, bash seems to be reading escaped-ASCII characters in your .bash_profile. What does the contents of the file look like?

One thing I forgot to note in the above post is that you need to save the preferences when doing step #3. There's a button in the inspector window that reads "Use Settings as Defaults". Click that after you've made changes to the window settings to make sure it stays there the next time you open a new Terminal window.
     
trolis  (op)
Fresh-Faced Recruit
Join Date: Sep 2007
Status: Offline
Reply With Quote
Sep 14, 2007, 04:03 AM
 
Thx ginoledesma for your support.

There was no such file in my home directory called .bash_profile so I created it according to your previous messsage. It looks like this:
echo "export LC_CTYPE=en_US.UTF-8" >> ~/.bash_profile
echo "export LANG=en_US.UTF-8" >> ~/.bash_profile
I am not sure where the problem is but mybe it is because I am using German keyboard and my default language (language bar) is also German (just to find some characters easily).
It is really impossible to use Terminal because for example if I type ds in terminal it countinues like this forever (until I stop it with Control + C):
dsssssssssssssssssssssssssssssssssssssssssssssssss ssssssssssssssssssssssssssssssssssssssssssssssssss ssssssssssssssssssssssssssssssssssssssssssssssssss ssssssssssssssssssssssssssssssssssssssssssssssssss ssssssssssssssssssssssssssssssssssssssssssssssssss ssssssssssssssssssssssssssssssssssssssssssss
P.S. Use option key as meta key is unchecked (I realized how to save new settings )
Thx once again for your kind help!

V.
     
trolis  (op)
Fresh-Faced Recruit
Join Date: Sep 2007
Status: Offline
Reply With Quote
Sep 14, 2007, 08:05 AM
 
Solved my problem!!! ~~~~~~||||||||||
Unix rules!
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 08:37 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2