fix a problem with default encoding