On 23 Sep 2014, at 6:28 , Offray Vladimir Luna Cárdenas <off...@riseup.net> 
wrote:

> Hi :-),
> 
> A small answer to myself that can be useful is someone find this thread:
> 
> I have seen some post on Internet about CR and LF issues on Pharo Smalltalk, 
> like this:
> 
> [1] 
> http://stackoverflow.com/questions/11739548/how-to-correctly-decode-text-files-from-filesystemreadstream-in-pharo-1-4
> [2] http://stackoverflow.com/questions/1598054/smalltalk-newline-character
> 
> A detailed search on the web take me to this:
> 
> http://magaloma.seasidehosting.st/Collections-Strings
> 
> Here I searched for "replace" and found the proper method:
> 
> """
> withInternetLineEndings
> change line endings from CR's to CRLF's. This is probably in
> prepration for sending a string over the Internet
> """
> 
> So taking my string and sending:
> 
>  myString contents withInternetLineEndings
> 
> did the trick.
> 
> I hope it will be helpful for future newbies.
> 
> Cheers,
> 
> Offray

A better solution if you are writing to file, and still want to keep the string 
in image with its default line ending, is using the lineEnding conversion of 
the Stream (MultiByteFileStream >> lineEndConvention:).

Cheers,
Henry

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

Reply via email to