Sha256: dfbf0a78ff79f4af050ccd39ea6a79336fd9c74ab317ffe324b69ed52864bef9

Contents?: true

Size: 427 Bytes

Versions: 1

Compression:

Stored size: 427 Bytes

Contents

require "rubygems"
require "charlock_holmes"
require "language_sniffer"
require "grit_ext/blob"
require "grit_ext/version"
require "grit_ext/raw_object"

module GritExt
  private
  def transcode(content)
    detection = CharlockHolmes::EncodingDetector.detect(content)
    if hash = detection
     content = CharlockHolmes::Converter.convert(content, hash[:encoding], 'UTF-8') if hash[:encoding]
    end
    content
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
grit_ext-0.1.0 lib/grit_ext.rb