Class CharDet::CharSetProber
In: lib/tmail/vendor/rchardet-1.3/lib/rchardet/charsetprober.rb
Parent: Object

Methods

Attributes

active  [RW] 

Public Class methods

[Source]

# File lib/tmail/vendor/rchardet-1.3/lib/rchardet/charsetprober.rb, line 33
    def initialize
    end

Public Instance methods

[Source]

# File lib/tmail/vendor/rchardet-1.3/lib/rchardet/charsetprober.rb, line 44
    def feed(aBuf)
    end

[Source]

# File lib/tmail/vendor/rchardet-1.3/lib/rchardet/charsetprober.rb, line 55
    def filter_high_bit_only(aBuf)
      # DO NOT USE `gsub!`
      # It will remove all characters from the buffer that is later used by
      # other probers.  This is because gsub! removes data from the instance variable
      # that will be passed to later probers, while gsub makes a new instance variable
      # that will not. 
      newBuf = aBuf.gsub(/([\x00-\x7F])+/, ' ')
      return newBuf
    end

[Source]

# File lib/tmail/vendor/rchardet-1.3/lib/rchardet/charsetprober.rb, line 70
    def filter_with_english_letters(aBuf)
      # TODO
      return aBuf
    end

[Source]

# File lib/tmail/vendor/rchardet-1.3/lib/rchardet/charsetprober.rb, line 65
    def filter_without_english_letters(aBuf)
      newBuf = aBuf.gsub(/([A-Za-z])+/,' ')
      return newBuf
    end

[Source]

# File lib/tmail/vendor/rchardet-1.3/lib/rchardet/charsetprober.rb, line 40
    def get_charset_name
      return nil
    end

[Source]

# File lib/tmail/vendor/rchardet-1.3/lib/rchardet/charsetprober.rb, line 51
    def get_confidence
      return 0.0
    end

[Source]

# File lib/tmail/vendor/rchardet-1.3/lib/rchardet/charsetprober.rb, line 47
    def get_state
      return @_mState
    end

[Source]

# File lib/tmail/vendor/rchardet-1.3/lib/rchardet/charsetprober.rb, line 36
    def reset
      @_mState = EDetecting
    end

[Validate]