Test encoding file