Rast is a full-text search system.
Rast::EncodingConverter.guess(text, candidate_encodings)
-
Guess the charset encoding of text.
Returns the guessed charset encoding.
- Parameters
-
- text
-
The text to guess.
- candidate_encodings
-
candidate_encodings Candidate charset encoding to guess.
Rast::EncodingConverter.convert_encoding(from_encoding, to_encoding, text)
-
Convert text to the target charset encoding.
Returns the converted text.
- Parameters
-
- from_encoding
-
The charset encoding before convertion.
- to_encoding
-
The charset encoding converted into.
- text
-
The text to convert.
Rast::EncodingConverter.new(from_encoding, to_encodings)
-
Create encoding converter.
- Parameters
-
- from_encoding
-
The charset encoding before convertion.
- to_encodings
-
The candidate charset encodings converted into.
convert(text)
-
Convert text to the target charset encoding.
The incomplete multibyte character is converted the next time convert
method called.
Returns the converted text.
- Parameters
-
- text
-
The text to convert.
set_property(name, value)
-
Set property to the document.
- Parameters
-
- name
-
The property name.
- value
-
The property value.
db_encoding
-
Get charset encoding of the database.
Return the charset encoding of the database.
pass(brigade, mime_type[, filename = nil])
-
Pass the next mime filter.
- Parameters
-
- brigade
-
The brigade that passed.
- mime_type
-
The mime_type to specify data type of the brigade.
- filename
-
The filename of the file to extract text and properties.
pass(brigade, mime_type)
-
Pass the next text filter.
- Parameters
-
- brigade
-
The brigade that passed.
- mime_type
-
The mime_type to specify data type of the brigade.