realbasic-nug
[Top] [All Lists]

Re: Shell Char Problem

To: REALbasic Network Users Group <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Shell Char Problem
From: "Joseph J. Strout" <joe at realsoftware dot com>
Date: Fri, 28 Jun 2002 10:39:56 -0700
At 2:24 PM -0300 5/28/02, Leonardo Lima de Vasconcellos wrote:

I´m working on a project that sends files using FTP. To make this
more easy I´m using a shell class (since this will work on MAC OS X)
to send files via ncftp.

Sounds neat.

s.writeline "put '/Users/leonardo/Desktop/Anúncio Final/AdWaterfalls.AP'"
And I get this as return:

ncftp /Users/leonardo/Leo > put '/Users/leonardo/Desktop/Anúncio
...
Cannot open local file /Users/leonardo/Desktop/Anúncio
Final/AdWaterfalls.AP for reading: No such file or directory.

What´s wrong? Maybe because the "ú"

Yep, that's it.  You've typed a word in MacRoman; the Shell expects
everything in UTF-8.  You can do this yourself, but if you're going
to generalize this app to work with arbitrary FolderItems, you may
want to get the MFile plugin (part of the great OS X Utilities pack
by Chad McQuinn) at: http://homepage.mac.com/huskerchad

but if I open a Terminal and type exactly the same thing everything
works fine.

The Terminal app is converting what you type to UTF-8 for you before
feeding it to the shell.  Your code must do the same thing.

Cheers,
- Joe

--
,------------------------------------------------------------------.
|    Joseph J. Strout           REAL Software, Inc.                |
|    joe at realsoftware dot com       http://www.realsoftware.com        |
`------------------------------------------------------------------'


<Prev in Thread] Current Thread [Next in Thread>