support auto detect encoding table