read_file

read_file(filename, encoding, force_transcode = false)
Class Public methods

Reads the contents of filename and handles any encoding directives in the file.

The content will be converted to the encoding. If the file cannot be converted a warning will be printed and nil will be returned.

If force_transcode is true the document will be transcoded and any unknown character in the target encoding will be replaced with '?'

doc_ruby_on_rails
2015-05-01 21:13:14
Comments
Leave a Comment

Please login to continue.