encoding [?] problem - different content on Win and Linux after downloading file
Maciej Opala
Greenhorn
Joined: Jul 18, 2011
Posts: 23
posted
0
Hi,
Don't know where to write but guess it might be the best forum.
I've written small command line tool in groovy to download/upload file to drools.
When I download file I receive different content on linux and win just after converting the stream to string (before saving file to local filesystem).
Linux:
Win:
Here's the code:
I use HttpComponents to handle net tasks. Does anybody know the explanation? I'm really annoyed with this problem and run out of possible solutions.
Alex Armenteros
Ranch Hand
Joined: May 05, 2010
Posts: 46
posted
0
I see this is not java but I encountered a similar problem last week.
be careful what programs do you use to transfer between SOs, WinSCP change the size of text files.
Also that way the file was read differently on Win than on Linux.
Finally I got it reading the file byte by byte.
Maciej Opala
Greenhorn
Joined: Jul 18, 2011
Posts: 23
posted
0
Thanks for the hint.
I'd consider it strange if it changed anything but will try nevertheless
Maciej Opala
Greenhorn
Joined: Jul 18, 2011
Posts: 23
posted
0
Have done it as You advised Alex Armenteros. Thanks for the solution! But it's strange that Apache IOUtils couldn't handle these stream operations correctly. Or I don't know how to use it.
subject: encoding [?] problem - different content on Win and Linux after downloading file