ruby - End of Line Problems -
i'm trying download images gmail account using gmail gem. works fine, except file downloaded through gem has cr + lf line endings , actual file has lf line endings.
why happening? how can fix it?
are on mac? suspect gmail gives lf line endings seeing basing in browser's user-agent.
in case, proper solution problem convert text using universal_newline converter. see documentation ruby built-in converters here: http://ruby-doc.org/core-1.9/classes/encoding/converter.html
Comments
Post a Comment