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

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -