In Files

Parent

Methods

File

Public Class Methods

read_utf(path) click to toggle source

Like File::read, but strips out a BOM marker if it exists.

# File lib/hoe.rb, line 659
def self.read_utf path
  open path, 'rb' do |f|
    f.read.sub /\A\xEF\xBB\xBF/, ''
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.