13. A computer-implemented method for handling an email message received through a communication network, said email message including a received document, said received document involving an encoding scheme, the method comprising: receiving a plurality of text document samples, said plurality of text document samples being encoded with different encoding schemes and selected for training purposes, said different encoding schemes pertaining to charset encoding for transmission over a network; and training, using said plurality of text document samples, to obtain a set of machine learning models, said training including generating fundamental units from said plurality of text document samples for charsets of said plurality of text document samples, extracting a subset of said fundamental units as feature lists, said extracting said subset of said fundamental units including filtering said fundamental units to obtain fundamental units that are more discriminatory in describing differences between said different encoding schemes, converting said feature lists into a set of feature vectors, and generating said set of machine learning models from said set of feature vectors using SIM (Similarity Algorithm), said feature vectors are grouped by charsets; applying said set of machine learning models against a set of received document feature vectors converted from said received document, said applying including analyzing said set of received document feature vectors using said set of machine learning models to compute similarity indicia between said set of received document feature vectors and said set of machine learning models associated with said different encoding schemes, said similarity indicia including at least a set of cross-angles between said set of target document feature vectors and said set of machine learning models, wherein a first encoding scheme associated with said set of machine learning models is designated as said encoding scheme if characteristics of said first encoding scheme as represented by said set of machine learning models are computed to be most similar, relative to other encoding schemes of said different encoding schemes, to said set of received document feature vectors; decoding said target document to obtain decoded content of said document based on at least said first encoding scheme; determining whether said email message is a spam message based on at least said decoded content of said document; and preventing said email message from reaching an email user if said email message is determined to be spam according to said determining.
13. A computer-implemented method for handling an email message received through a communication network, said email message including a received document, said received document involving an encoding scheme, the method comprising: receiving a plurality of text document samples, said plurality of text document samples being encoded with different encoding schemes and selected for training purposes, said different encoding schemes pertaining to charset encoding for transmission over a network; and training, using said plurality of text document samples, to obtain a set of machine learning models, said training including generating fundamental units from said plurality of text document samples for charsets of said plurality of text document samples, extracting a subset of said fundamental units as feature lists, said extracting said subset of said fundamental units including filtering said fundamental units to obtain fundamental units that are more discriminatory in describing differences between said different encoding schemes, converting said feature lists into a set of feature vectors, and generating said set of machine learning models from said set of feature vectors using SIM (Similarity Algorithm), said feature vectors are grouped by charsets; applying said set of machine learning models against a set of received document feature vectors converted from said received document, said applying including analyzing said set of received document feature vectors using said set of machine learning models to compute similarity indicia between said set of received document feature vectors and said set of machine learning models associated with said different encoding schemes, said similarity indicia including at least a set of cross-angles between said set of target document feature vectors and said set of machine learning models, wherein a first encoding scheme associated with said set of machine learning models is designated as said encoding scheme if characteristics of said first encoding scheme as represented by said set of machine learning models are computed to be most similar, relative to other encoding schemes of said different encoding schemes, to said set of received document feature vectors; decoding said target document to obtain decoded content of said document based on at least said first encoding scheme; determining whether said email message is a spam message based on at least said decoded content of said document; and preventing said email message from reaching an email user if said email message is determined to be spam according to said determining. 17. The computer-implemented method of claim 13 wherein said SIM is implemented by Sim ⁡ ( V , U ) = cos ⁡ ( V , U ) = ∑ k = 1 n ⁢ ⁢ val V ⁡ ( t k ) · val U ⁡ ( t k ) ∑ k = 1 n ⁢ ⁢ val V ⁡ ( t k ) 2 ⁢ ∑ k = 1 n ⁢ ⁢ val U ⁡ ( t k ) 2 · 0 ≤ Sim ⁡ ( V , U ) ≤ 1.