Class: CharDet::CharSetProber

### Home Classes Methods

### In Files

- lib/tmail/vendor/rchardet-1.3/lib/rchardet/charsetprober.rb

### Parent

Object

### Methods

- ::new
- #feed
- #filter_high_bit_only
- #filter_with_english_letters
- #filter_without_english_letters
- #get_charset_name
- #get_confidence
- #get_state
- #reset

### Files

- CHANGES
- LICENSE
- NOTES
- README
- Rakefile
- MANIFEST
- Makefile
- depend
- Makefile
- COPYING
- README

### Class/Module Index

Quicksearch

- TMail
- TMail::Address
- TMail::AddressGroup
- TMail::AddressHeader
- TMail::Attachment
- TMail::ContentDispositionHeader
- TMail::ContentTransferEncodingHeader
- TMail::ContentTypeHeader
- TMail::DateTimeHeader
- TMail::EncryptedHeader
- TMail::FilePort
- TMail::HeaderField
- TMail::KeywordsHeader
- TMail::Mail
- TMail::MailFlags
- TMail::Maildir
- TMail::MaildirLoader
- TMail::MaildirPort
- TMail::MboxLoader
- TMail::MessageIdHeader
- TMail::MhLoader
- TMail::MhMailbox
- TMail::MhPort
- TMail::MimeVersionHeader
- TMail::Parser
- TMail::Port
- TMail::ReceivedHeader
- TMail::ReferencesHeader
- TMail::ReturnPathHeader
- TMail::SingleAddressHeader
- TMail::StringPort
- TMail::StructuredHeader
- TMail::SyntaxError
- TMail::TMailScanner
- TMail::TextUtils
- TMail::UNIXMbox
- TMail::UnstructuredHeader
- CharDet
- CharDet::Big5DistributionAnalysis
- CharDet::Big5Prober
- CharDet::CharDistributionAnalysis
- CharDet::CharSetGroupProber
- CharDet::CharSetProber
- CharDet::CodingStateMachine
- CharDet::EUCJPContextAnalysis
- CharDet::EUCJPDistributionAnalysis
- CharDet::EUCJPProber
- CharDet::EUCKRDistributionAnalysis
- CharDet::EUCKRProber
- CharDet::EUCTWDistributionAnalysis
- CharDet::EUCTWProber
- CharDet::EscCharSetProber
- CharDet::GB2312DistributionAnalysis
- CharDet::GB2312Prober
- CharDet::HebrewProber
- CharDet::JapaneseContextAnalysis
- CharDet::Latin1Prober
- CharDet::MBCSGroupProber
- CharDet::MultiByteCharSetProber
- CharDet::SBCSGroupProber
- CharDet::SJISContextAnalysis
- CharDet::SJISDistributionAnalysis
- CharDet::SJISProber
- CharDet::SingleByteCharSetProber
- CharDet::UTF8Prober
- CharDet::UniversalDetector

No matching classes.

# CharDet::CharSetProber

### Attributes

active[RW]

### Public Class Methods

new() click to toggle source

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

### Public Instance Methods

feed(aBuf) click to toggle source

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

filter_high_bit_only(aBuf) click to toggle 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

filter_with_english_letters(aBuf) click to toggle source

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

filter_without_english_letters(aBuf) click to toggle 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

get_charset_name() click to toggle source

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

get_confidence() click to toggle source

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

get_state() click to toggle source

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

reset() click to toggle source

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

[Validate]

Generated with the Darkfish Rdoc Generator 2.