-
Notifications
You must be signed in to change notification settings - Fork 349
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filename start with non-latin charaters would disappear after download #474
Comments
Try to set https://github.com/simogeo/Filemanager/wiki/Filemanager-configuration-file#the-options-section |
|
I'll add a test to give a name if string is empty. Stay tuned |
should be ok, please see last commit 4dc16b0 and download last version |
OMG! In the latest version, all files start with non-latin charaters become "unsupportedCharsReplacement" after upload! It is even not so convenient as previous version! |
What would you like ? I opted for an explicit message but if you want I can make it easy to customize. Do you have other proposition ? Or maybe, you want to provide a fix ? |
The best option is too keep the original filename as it is. Of course now we could use a workaround: Add some symbol(for example, a underscore symbol) before the filename. Fox example, it a file called "空白.txt", then we could change it to "_空白.txt". Then it is OK now. |
Hey. I don't know the reason of the problem when filenames started from non-latin chars, but I have just checked this case on my fork and works fine. File "空白blank.txt" was uploaded as is. But be aware that I am still working on my fork and believe it is not stable enough so far. I invite you to test my fork if you want. Check the roadmap for details. |
Hey, I have faced with the same problem with cyrillic chars on Linux (it was fine on Windows). Further investigation led me to this. The case is that
I was experimenting with strings which begin with Cyrillic and Chinese chars (as in the topic) and came to the conclusion that there is no difference what language is set for locale. Both @simogeo As you know my fork is too different from the main repo. I want you to check this case for the current version of the filemanager to be sure this works. Would you do this? |
well spotted @servocoder : indeed, it works. I will PR soon waiting for a stable fork |
Not sure we should hardcode locale for end user. It may overrides a locale, that user set above in the code. Perhaps just to specify the case in docs. What do you think? |
should not be hard coded for sure, that's why I added the following comment |
Bug: If filenames start with non-latin charaters, the non-latin charater part would disappear after download. ("chars_only_latin" has been set to false,)
Reproduce: Prepare four blank text files named:
All of them could be normally uploaded. After download, the filename of
blank空白.txt
andblank空白blank.txt
is OK, However the filename of空白blank.txt
and空白.txt
is wrong:The text was updated successfully, but these errors were encountered: