fix encoding detech