Foreign characters in bash


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Foreign characters in bash
# 1  
Old 12-03-2001
Foreign characters in bash

Hello,

I'm trying to type in foreign characters (á, é, í, ñ...) from the bash when doing a Telnet to my UNIX account.

So far it only allows me to type in the standard character set (up to ASCII 128). I need this to feed parameters to certains scripts and programs.

Thanks!

Miguel
# 2  
Old 12-03-2001
Try using the "-8" option to telnet if your version supports it. Alternately give telnet the "toggle binary" command to enable 8-bit transport.

i.e.:


$ telnet
telnet> toggle binary
Negotiating binary mode with remote host.
telnet> open yourserver.com
Trying...
Connected to yourserver.com
Escape character is '^]'.
...
# 3  
Old 12-03-2001
Hello PxT,

thanks for your quick reply.

I forgot to tell you that I'm not telnetting from another UNIX machine, but from a Windows system. As far as I know Windows' Telnet does not have these switches (I have to use a Telnet program with SSH anyway, because my host refuses insecure Telnet connections.

Miguel
# 4  
Old 12-03-2001
What type of system are you connecting to? Some machines use tty/pty's that are not 8-bit clean.

Try issuing: stty -parenb -istrip cs8

to see if that helps.
# 5  
Old 12-04-2001
Hello and thanks again. I'm learning new things about Unix and that's great.

This is the log of my Telnet session:

bash$ stty -parenb -istrip cs8
==> Here I tried to type in "Camarón". It didn't work
bash$ Camarn

This is what "stty" gives. Don't whether this is useful for you:

bash$ stty
speed 9600 baud; -parity
rows = 24; columns = 80; ypixels = 0; xpixels = 0;
swtch = <undef>;
brkint -inpck -istrip icrnl -ixany imaxbel onlcr tab3
echo echoe echok echoctl echoke iexten
bash$


Miguel
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Telnet Bash Script (Connection closed by foreign host.)

Hello Everyone, My following script is giving me problems, when the SIP trunk goes down and the telnet session is started and just when the command is about to complete the connection is closed then script restarts. I have noticed that as soon the script types in "sys re" or "sys rebo" or... (6 Replies)
Discussion started by: jeetz
6 Replies

2. Shell Programming and Scripting

Deleting particular characters from each line in a file in bash

Hi All, I am struck with an issue. I need to delete '%' and 'G' from all lines in the input file. Below is what I want to do. InputFile 04/09/2012.21:58:17,well9,rootfs,3.9G,2.7G,1.1G,71%,/ 04/09/2012.21:58:17,well9,/dev/hda2,3.9G,2.7G,1.1G,71%,/... (6 Replies)
Discussion started by: vharsha
6 Replies

3. UNIX for Dummies Questions & Answers

Bash: using SED, trying to replace some characters except first or last line

Hi, I require to replace 2 items: 1. replace start of all lines in a file with ' except the first line 2. replace end of all lines in a file with '||chr( except last line I am able to do the entire file using sed -e s/^/\'/g -e s/$/\'\|\|chr\(/g "$file" > newfile.txt but am not yet... (3 Replies)
Discussion started by: Chella15
3 Replies

4. Shell Programming and Scripting

[BASH] Keep only certain characters

Hi, My google fu has failed me on this one Im writing a bash script that can parse a xml document using xpath and then creates a php page, too add to my wordpress blog however sometimes the returned string is invalid for php, or atleast in the function im using on the php script so im... (1 Reply)
Discussion started by: Viporous
1 Replies

5. Shell Programming and Scripting

Bash script - stripping away characters that can't be used in filenames

I want to create a temp file which is named based on a search string. The search string may contain spaces or characters that aren't supposed to be used in filenames so I want to strip those out. My thought was to use 'tr' with but the result is the opposite of what I want: $ echo "test... (5 Replies)
Discussion started by: mglenney
5 Replies

6. Shell Programming and Scripting

Special characters in a bash variable in sed

Hello, I am trying the following: echo __CHANGEME__ >> testfile VAR1="&&&" sed -i "s|__CHANGEME__|${VAR1}|" testfile cat testfile This results in testfile containing __CHANGEME____CHANGEME____CHANGEME__ Whereas I want it to result in &&& I understand that if VAR1="\&\&\&" then... (3 Replies)
Discussion started by: linuxnewbeee
3 Replies

7. UNIX for Advanced & Expert Users

foreign characters in flat file

Hey, Is there anyway I anks, Pocha (12 Replies)
Discussion started by: pochaman
12 Replies

8. Shell Programming and Scripting

foreign characters

I have a flat file and have foreign characters in three fields. Can somebody tell me how to get rid of these special characters? It's very urgent because without this my process is failing. Thanks in advance. Angielina (2 Replies)
Discussion started by: angelina
2 Replies

9. UNIX for Advanced & Expert Users

foreign characters

I have a flat file and have foreign characters in three fields. Can somebody tell me how to get rid of these special characters? It's very urgent because without this my process is failing. Thanks in advance. Angielina (1 Reply)
Discussion started by: angelina
1 Replies

10. Programming

Problem with including foreign characters in Lex rule

Hi, I'm hoping that someone might be able to help me with this problem: I have already added new code to several existing Lex rules to accept the following foreign characters: å ä ö Å Ä Ö æ Æ ø Ø ü Ü ß. The code looks like this: /*Nathalie Stern, 080121 - Add å ä ö Å Ä Ö æ Æ ø Ø ü Ü ß handling to function*/... (1 Reply)
Discussion started by: Nathalie1
1 Replies
Login or Register to Ask a Question