-
Junior Member
Adding extra control charcters in an uncompressed file.
I am creating a GZip file in linux by a java program. After Unzipped(by using gunzip command) the file in linux i am getting the file with the correct data. I ftped the file from Linux to Unix in binary mode. After unzipped(by using gunzip command) the file in Unix i am not getting the file with correct data. The control character(^M) is adding at every end of line. I am not able to find why its happening. Anyone can help me ?
Plz..........
Thanks
-
Junior Member
Re: Adding extra control charcters in an uncompressed file.
This is a common problem with unix. Generally most of the operating systems add line feed and carriage return at end of each line. But Unix adds only line feed. Already zipped file in linux has line feed and carriage return at end of the lines. Unix unable to recognize carriage return character. So, it added ^M character at end of the each line.
You can solve this by transfer the file using ascii mode instead of binary mode.
I think in ur code u used " FullFtpClient.binary(); " for ftping in binary mode.
Use " FullFtpClient.ascii(); " instead.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules