checking encoding