fix encoding and skip grammar