bastibe / python-soundfile

SoundFile is an audio library based on libsndfile, CFFI, and NumPy
BSD 3-Clause "New" or "Revised" License
701 stars 108 forks source link

Test Unicode and bytes handling (Python 2 and 3) in all string arguments #122

Open mgeier opened 9 years ago

mgeier commented 9 years ago

After merging #119, the file argument should support str and unicode in Python 2 and str and bytes in Python 3. The arguments mode/format/subtype/endian should support str and unicode in Python 2 and only str in Python 3 (bytes should be disallowed there).

There are some facts that are especially annoying when testing this:

mgeier commented 9 years ago

I repeat my recommendation here: Anyone who wants to know about the pitfalls of handling Unicode should watch this: http://nedbatchelder.com/text/unipain.html