BTW: If you are storing binary data, you would need to convert it to Base64 to get printable characters only (and handle the newlines yourself). Here's an example from the spec (http://yaml.org/spec/current.html ) --- picture: | R0lGODlhDAAMAIQAAP//9/X 17unp5WZmZgAAAOfn515eXv Pz7Y6OjuDg4J+fn5OTk6enp 56enmleECcgggoBADs= --- jf On 12/13/05, Johannes Friestad <johannes.friestad / gmail.com> wrote: > Suggested reading: > http://yaml4r.sourceforge.net/cookbook/ > Look under 'blocks' > > > My question is: how can I configure YAML to preserve my line endings? > > > I'm using Ruby 1.8.4-preview2 and have Googled for a solution without > > > success. Note that the :UseBlock option to to_yaml does not help. > > > > > > The reason that I need this functionality is that I would like to store > > > a string which includes a digital signature in a YAML document. Any > > > corruption of the line endings changes the string and consequently > > > invalidates the digital signature. > > >