changed ascii_only mode to encoding mode