Text decoding functions added to encoding detector