System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot cd in ftp shell because it does not recognize character

tsunix-pdm-1
Advisor

Cannot cd in ftp shell because it does not recognize character

Hello,

Inside an ftp shell I cannot cd to a directory, because it does not recognize the character " ó " ; instead it appears blurred  (like a small array of points). This is the directory:

ftp> dir
200 PORT command successful.
125 Data connection already open; Transfer starting.
10-20-16 08:20AM <DIR> Configuraci▒n  

Copy and paste in an HP-UX kshell it looks this way: Configuracib^Rn

It seems that in ftp shell, escaping or wildcards do not work. Any idea on how to cd to that directory inside an ftp shell ?

Kind regards,

 

4 REPLIES
ranganath ramachandra
Esteemed Contributor

Re: Cannot cd in ftp shell because it does not recognize character

Perhaps it is obvious but I'm guessing you're not able to type that character.

You could try running the ftp session within a GNU screen or tmux terminal (with utf8 on) and copy-paste the text.

This is based on my vague speculation that your current terminal does not support unicode and displays the wrong character instead, then when you copy-paste (with the mouse), it is the wrong character which gets pasted.  So on a terminal emulator that supports unicode, you should be able to see that character (with appropriate fonts available etc). Then, you should be able to copy-paste it at least with the screen/tmux copy-paste (not with the mouse) functionality.

If that doesn't work, another ftp client like GNU ftp or lftp which provides tab-based filename completion might be worth a try.

tsunix-pdm-1
Advisor

Re: Cannot cd in ftp shell because it does not recognize character

Hi,

It is an ftp session from an HP-UX system to a windows system. It uses the ftp client provided by HP-UX...

Kind Regards,

ranganath ramachandra
Esteemed Contributor

Re: Cannot cd in ftp shell because it does not recognize character

I'm not very sure of what I'm suggesting, so you might want to try these only if you have no other choice.

It is possible to login to an HP-UX system through a GNU screen terminal on another system - linux, hp-ux etc (not sure of windows). You could then start the ftp session from there.

Also, open-source ftp alternatives like cFTP are available for HP-UX on the HP-UX connect website.

Dennis Handly
Acclaimed Contributor

Re: Cannot cd in ftp shell because it does not recognize character

> instead it appears blurred  (like a small array of points).

 

That's the char used to indicate that there is no translation for the char you want.  I forgot its name.

It's not quite like:  https://en.wikipedia.org/wiki/Specials_(Unicode_block)

Ah:  http://www.unicode.org/charts/PDF/U2580.pdf

\xe2\x96\x92

2592 ▒ MEDIUM SHADE
= speckles fill, dotted fill
• 50%
• used in mapping to cp949

For example using Linux and Putty, I have to set putty translation to UTF-8 and for Linux, I have to set the locale to pick one with UTF-8 chars.  And then set LC_CTYPE to that locale, LC_CTYPE=C.UTF-8.

So if you can get your ftp to display it correctly using "ls", you're on your way.

I got this to work on HP-UX using LC_CTYPE=C.utf8 with lower case PI.  I had to make sure "stty -istrip" was set.

But I was using ftp to my own system and the directory was created with UTF-8 chars.  Not sure if Window's would be different?