From: Robert Klemme Date: 2013-06-07T20:03:40+09:00 Subject: Re: Converting an xml file to byte array in ruby --20cf3074b02c08fb5404de8e62af Content-Type: text/plain; charset=ISO-8859-1 On Fri, Jun 7, 2013 at 12:30 PM, Khudadad Kazi wrote: > That got resolved. > > The call to the web services required the array to be passed as: > target_ids=[] > target_ids.push('fr-fr') > target_ids.push('de-de') > > And the Base64.encode64 worked as > > file_data=Base64.encode64(File.read(file_path)) > > You'll want File.read(file_path, encoding: "BINARY") Cheers robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/ --20cf3074b02c08fb5404de8e62af Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable



On Fri, Jun 7, 2013 at 12:30 PM, Khudadad Kazi &l= t;lists@ruby-foru= m.com> wrote:
That got resolved.

The call to the web services required the array to be passed as:
target_ids=3D[]
target_ids.push('fr-fr')
target_ids.push('de-de')

And the Base64.encode64 worked as

file_data=3DBase64.encode64(File.read(file_path))


You'll want=A0F= ile.read(file_path, encoding: "BINARY")

Cheers

robert

--
remember.guy do |as, often| as.you_can - without end<= br>http://blog.rubybestpract= ices.com/
--20cf3074b02c08fb5404de8e62af--