Backwards question mark appearing in FTP'd file

Hi all,

I'm trying to FTP what looks like a simple .txt file from my Windows XP desktop to my UNIX server. I've tried using several programs to do this including UltraEdit and FTP Commander. I have tried sending it ascii, binary and even let the program decide. But every time it arrives in UNIX it includes a character that looks like a backwards question mark at the very beginning and it screws up my scripts meant to read the file.

Any suggestions on how to get rid of this darn thing? :confused:

what's the byte count before and after? what's the first char look like under UltraEdit's hex mode? [ctrl-h]

The byte count is the same on both the desktop and UNIX. The first character under UltraEdit's hex mode is FF followed by FE

Appears to be a UTF-16 byte order mark:

Byte order mark - Wikipedia, the free encyclopedia

From another forum, one Unix utility to convert to UTF-8 (assuming your program cannot process UTF-16 encoded text) might be recode:

recode - GNU Project - Free Software Foundation (FSF)

There is also this utility which may be useful:

iconv -f UTF-16 -t UTF-8 myfile > temporary_file
grep '1 CHAR UNICODE' temporary_file

I tried the iconv command and got the following error: iconv: can not initialize the conversion