From: Robert Klemme Date: 2010-01-16T17:54:18+09:00 Subject: Re: End of line problem with xmlrpc 2010/1/15 Phillip Gawlowski : > On 15.01.2010 17:46, Hubert Martin-deidier wrote: >> >> Robert Klemme wrote: >>> >>> This one irritates me: by using base64 encoding you should be fine, >>> shouldn't you? >> >> I also agree with you, I can even say that I completly agree with you. >> I quicky look at source code of XMLRPC protol but I'm afraid that for >> base64 there is a stirng conversion that may explain this problem. I'm >> not sure of what I'm saying. > > That's probably the issue. CR and LF are line ending characters. And > Windows, Linux, and UNIX deal with them differently. If your string > conversion happens on a *NIX, Windows applications won't be able to handle > the files gracefully, like Word. (Windows expects CR LF, while Linux > produces LF, and Mac OS CR; or something like that). That should not be the case since a) he is doing reading and writing in binary and b) base64 encoding does not care whether you have CR or CRLF as line ending. It does not influence the decoding. Admittedly we haven't seen the sample code so there might be a quirk somewhere we haven't thought of yet. Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/