2010/1/15 Hubert Martin-deidier <hubert.martin-deidier / turbomeca.fr>: > 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. As far as I can see this works ok on 1.9.1 irb(main):011:0> raw = "".encode! "BINARY" => "" irb(main):012:0> raw.encoding => #<Encoding:ASCII-8BIT> irb(main):013:0> 255.times {|i| raw << i} => 255 irb(main):014:0> raw.length => 255 irb(main):015:0> raw.bytesize => 255 irb(main):016:0> enc = Base64.encode64 raw => "AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKiss\nLS4vMDEyMzQ1Njc4OTo7PD0+P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZ\nWltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn+AgYKDhIWG\nh4iJiouMjY6PkJGSk5SVlpeYmZqbnJ2en6ChoqOkpaanqKmqq6ytrq+wsbKz\ntLW2t7i5uru8vb6/wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd3t/g\n4eLj5OXm5+jp6uvs7e7v8PHy8/T19vf4+fr7/P3+\n" irb(main):017:0> enc.encoding => #<Encoding:US-ASCII> irb(main):018:0> dec = Base64.decode64 enc => "\x00\x01\x02\x03\x04\x05\x06\a\b\t\n\v\f\r\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\e\x1C\x1D\x1E\x1F !\"\#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7F\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE" irb(main):019:0> dec.length => 255 irb(main):020:0> dec.bytesize => 255 irb(main):021:0> dec.encoding => #<Encoding:ASCII-8BIT> irb(main):022:0> raw == dec => true irb(main):023:0> > Someone know If there is a way to look at the XML message sent. In this > way I can determine if the problem is from the client (emission of the > file) or from the server (reception of the file) Dunno that library. Someone else might be able to help. If everything fails you can use a packet sniffer and look at the network traffic. Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/