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 |
`------------------------------------------------------------------'
|