Originally created by: jwb1980
https://sourceforge.net/p/forge/site-support/8700/
[forge:site-support:#8700]
From IRC #sourceForge
download the source code of this project https://sourceforge.net/p/nhunspell/code/ci/default/tree/
3:55 When I try the snapshot Sourceforge says "We're having trouble finding that snapshot. Would you like to resubmit?"
3:55 TortoiseSVN gives me error 500 in my fork repository
Diff:
This seems like a problem in mercurial-py, though I am still investigating it. The trigger for error is this directory, which contains some files with unicode symbols in their names https://sourceforge.net/p/nhunspell/code/ci/default/tree/NHunspell/UnitTests/
Interestingly, if you click on one of these, you will get a 500 error https://sourceforge.net/p/nhunspell/code/ci/default/tree/NHunspell/UnitTests/de_DE_%C3%B6_frami.aff
So I made an interesting finding. The file in question has a name de_DE_ö_frami.aff.
I cloned the repo and made some experiments in the same dir as the file. First I tried usual tricks with .encode('utf-8') and the like, but it didn't help. But then it struck me:
So this seems like python's os.listdir reports the filename incorrectly! I experimented with cyrillic file names and found no problems
Other random unicode file names like "ᕕ┌◕ᗜ◕┐ᕗ" don't have this problem either
Conclusion: we have a strange rare bug with python's os module scrambling unicode filenames.
Last edit: LXj 2015-06-30
I saw this error while working on a docker ticket on all repos with unicode filenames. Generating UTF-8 locale and setting it as default fixed that for docker:
It seems like deployment specific thing to me. Server might be missing some locale, which is needed to properly decode filenames. We'll investigate it further to confirm.
Closed #811.
forgehg:ib/7757
The problem was that we had path to archive directory as unicode, and mercurial tried to decode it while concatenating it with file name, which is utf-8 encoded plain string, not unicode. I've fixed it by encoding path to archive directory as utf-8 plain string.
I could not fix the issue with browsing, though https://sourceforge.net/p/nhunspell/code/ci/default/tree/NHunspell/UnitTests/de_DE_%C3%B6_frami.aff
The error is:
I did some digging:
u'/NHunspell/UnitTests/de_DE_\xf6_frami.aff'
'de_DE_\xc3\xb6_frami.aff'
.'NHunspell/UnitTests/de_DE_\xf6_frami.aff'
(looks like (1), but str, not unicode)I've tried several places to fix it, but did't succeed.
Looks good, one step forward for the code snapshot. We can leave the
ManifestLookupError
issue when browsing for another day I guess.