mekberg / boar

Automatically exported from code.google.com/p/boar
61 stars 8 forks source link

AssertionError: All filenames should be unicode #100

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a file with a name that is not a legal sequence under the system 
preferred filename encoding (Usually utf8) You can create an illegal utf8 
filename with this commmand: python -c "open('illegal\xa0\xa1', 'w')" 
2. Import the file in boar

What is the expected output? What do you see instead?

The file should be imported into boar, alternatively a nice error message 
explaining the situation should be printed. Instead, an assertion error is 
raised.

This problem is caused by filenames that contain sequences that are not valid 
encodings. This can happen when moving files between platforms, if the files 
has been created with a different encoding than what is used on the platform 
where boar tries to import the file. Boar cannot know how such filenames should 
be interpreted, but it should handle the situation gracefully.

Original issue reported on code.google.com by ekb...@gmail.com on 11 Aug 2013 at 11:00