Skip to content
This repository has been archived by the owner on Sep 27, 2020. It is now read-only.

Bad filename encoding breaking rom list view #39

Open
sveetch opened this issue Dec 5, 2015 · 7 comments
Open

Bad filename encoding breaking rom list view #39

sveetch opened this issue Dec 5, 2015 · 7 comments
Labels
Milestone

Comments

@sveetch
Copy link
Member

sveetch commented Dec 5, 2015

Seems at least on the rom list view, but probably on bios too.

psx bug

@sveetch sveetch added the bug label Dec 5, 2015
@sveetch sveetch modified the milestone: 1.1.0 Dec 17, 2015
@sveetch sveetch changed the title Non ascii filenames break list views Bad filename encoding breaking rom list view Dec 19, 2015
@sveetch
Copy link
Member Author

sveetch commented Dec 19, 2015

Ok i can't reproduce the bug, it's not an unicode problem because it works nice even with filename written in Kana and probably with every valid unicode (symbols, Cyrillic, etc..).

What i think it's than the user has uploaded files (at least one) with corrupted encoding filename. Until i can reproduce it, i will just put an exception safe block to simply ignore corrupted filename so it does not affect the list process.

Hey @neolao @pasnox @digitalLumberjack @MikaXII @rockaddicted could you help me and try to reproduce it ? Thanks

sveetch added a commit that referenced this issue Dec 20, 2015
 and #46;

* Granted 'bin' extension for roms on Atari2600 system;
* Updated basic pip requirement file to fix Django version on 1.8.x for now;
* Fixed Makefile action 'install' to use the right pip requirement file path;
* Added a global page footer containing the manager version, close #45;
* Only display supported extensions for knowed rom systems from manifest, for unknow system ddirs don't filter on file extension, close #40;
* Unmount '/admin/' because it's useless and may give back some ressources;
* Naive fix to avoid throwing exception on bad encoded filename in rom list view, just ignore it and continue. Related to #39;
* Bump to 1.1.3;
@pasnox
Copy link
Member

pasnox commented Dec 20, 2015

Partly easy - mount a ntfs iso latin file system as utf8 on linux. Should
present broken encoding.
On 20 Dec 2015 00:14, "David THENON" notifications@github.com wrote:

Ok i can't reproduce the bug, it's not an unicode problem because it works
nice even with filename written in Kana and probably with every valid
unicode (symbols, Cyrillic, etc..).

What i think it's than the user has uploaded files (at least one) with
corrupted encoding filename. Until i can reproduce it, i will just put an
exception safe block to simply ignore corrupted filename so it does not
affect the list process.

Hey @neolao https://github.com/neolao @pasnox
https://github.com/pasnox @digitalLumberjack
https://github.com/digitalLumberjack @MikaXII
https://github.com/MikaXII @rockaddicted
https://github.com/rockaddicted could you help me and try to reproduce
it ? Thanks


Reply to this email directly or view it on GitHub
#39 (comment)
.

@sveetch
Copy link
Member Author

sveetch commented Dec 20, 2015

@pasnox oh thanks for the info.

This is pretty difficult for me to reproduce this since i dont have any ntfs nor latin file system FS

@sveetch
Copy link
Member Author

sveetch commented Dec 20, 2015

Ok, well for now i will consider this as a "wont fix", will notify about in the README and keeping this bug issue open until 1.2.0, and will close it if not any news

@tlanks
Copy link

tlanks commented Dec 22, 2015

import sys
default_encoding = 'utf-8'
if sys.getdefaultencoding() != default_encoding:
reload(sys)
sys.setdefaultencoding(default_encoding)

@tlanks
Copy link

tlanks commented Dec 22, 2015

@sveetch
Copy link
Member Author

sveetch commented Dec 22, 2015

@tlanks i dont really understand what you mean, just know that nowadays we are almost full unicode, and utf-8 is mostly used for output formatting.

All in all, your code wont change anything even if i was able to reproduce the bug on my recalbox.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants