ensure use of codecs.open