'From Squeakland.396-Nihongo7.29 of 14 March 2005 [latest update: #33] on 14 March 2005 at 1:57:50 pm'! "Change Set: encodedTextLineEnd Date: 14 March 2005 Author: Yoshiki Ohshima view as encoded text do smart conversion of line ending."! !FileList methodsFor: 'private' stamp: 'yo 3/14/2005 13:55'! readContentsAsEncoding: encodingName | f writeStream converter c | f _ directory oldFileOrNoneNamed: self fullName. f ifNil: [^ 'For some reason, this file cannot be read']. writeStream _ WriteStream on: String new. converter _ TextConverter defaultConverterClassForEncoding: encodingName. converter ifNil: [^ 'This encoding is not supported']. f converter: converter new. f wantsLineEndConversion: true. [f atEnd or: [(c _ f next) isNil]] whileFalse: [writeStream nextPut: c]. f close. ^ writeStream contents! !