-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Problems with multibyte unicode characters in filenames #4513
Comments
cc @icewind1991 |
@georgehrke Is the locale en_US.UTF-8 installed? THX |
Yes and it's the only enabled in /etc/locale.gen |
What unicode character did you use? |
hmm - browsers on my debian are not capable of displaying the character properly: Nautilus can't either. I really wonder if we shall support all kinds of crazy characters out there. |
"I really wonder if we shall support all kinds of crazy characters out there." Owncloud should definetly support UTF-8 in its entirety. It isn't up to owncloud to display the characters correctly though, that is the browser's responsibility. |
That's indeed strange. ownCloud should fully support UTF-8. The fact that is shows up correctly after upload and is broken after reload indicates that the bug might be somewhere in the frontend/js code. Maybe a wrong encoding somewhere in an ajax call? |
I checked on the coding, and as far as I can see that in OC\LIB\PRIVATE\FILES\Mapper.php the private function slugify($text) is seems doing a job to remove any unicode part of the file name and store only the ASCI part of the file name into physical_path.
When I do a test to change this function so that only $text is returned without any modification, the correct unicode part of the file path can be stored into mysql database for both logic_path and also physic_path in oc_file_map mysql databse 5.6.14 in windows environment. without the modification, OC 6.0.2 will actually store files without the unicode part of the name into both the physic_path in mysql database and also the actual file name on the data folder (unicode).pdf becomes -.pdf Andrew |
See #17978 (comment) for arguments for both ways. |
This can still cause severe problems on ownCloud 9.0.5.2 with MariaDB 10:
Steps to reproducePreparation
"Share" a White Screen of Death
The result: After reloading the page Romeo sees this file as "love letter". From now on http calls from Juliet won't have any content (resulting in a white page). The server replies with 200 and doesn't log anything (no info, no warning, no error). Romeo is not affected by this white screen. What happened?: The actual file in the file system got created correctly. The entry in the database does not contain the file extension. Share your own root folder
The result: After reloading the page Romeo sees this file as "files". Juliet sees a folder called "(2)". This folder contains all files from Romeo. Juliet also sees the file as "(2)" inside that folder "(2)". What happened?: The actual file in the file system got created correctly. I think ownCloud stoped at the 4 byte character and shared Romeo's / instead of "/🐦love letter.txt". My SystemServerOperating system: ubuntu-16.04.1-server-i386 Web server: Apache/2.4.18 (Ubuntu) Database: 10.0.27-MariaDB-0ubuntu0.16.04.1 PHP version: 7.0.8-0ubuntu0.16.04.2 ownCloud version: 9.0.5.2 Community Updated from an older ownCloud or fresh install: fresh install Where did you install ownCloud from: owncloud.org phpinfo: https://gist.github.com/jaller94/92fe27758d2394ba6cf2442d6e9578c0 Signing status (ownCloud 9.0 and above):
The content of config/config.php:
Are you using external storage, if yes which one: no Are you using encryption: no Are you using an external user-backend, if yes which one: no ClientBrowser: Firefox 45.2.0 and IE 11 on Windows 7 |
Uploading "..🐦.txt"Uploading a file "..🐦.txt" into my home directory (bug using: trying to get access to the parent dir): The result: I can't access my home directory anymore. An error is shown: owncloud.log:
Sharing it with another userBefore my home directory became unavailable I shared it with my Test-Account "tester" (because when I shared The result: After the user "tester" logs into owncloud all http-requests get replied with 200 but don't contain any content. (white screen) owncloud.log:
|
see #21899 for additional info |
@DeepDiver1975 anything else ? |
@DeepDiver1975 doctrine migrations merged. Can you move forward with the 4 byte unicode PR ? |
for reference: 00006329 |
Hi Guys, could you please tell me some feedback from this issue? |
Fixed with oc10 |
raise doc ticket for configuration hints: https://github.com/owncloud/documentation/issues/2924 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Expected behaviour
ownCloud should handle multibyte unicode characters in filenames correctly.
Actual behaviour
ownCloud drops every character after (multibyte) unicode character in a filename
Steps to reproduce
Server configuration
Operating system:
Debian 7
Web server:
Apache
Database:
MySQL
PHP version:
PHP 5.4.x
The mbstring extension is enabled
ownCloud version:
latest master
Client configuration
Browser:
Chromium 30.0.1592.0
Operating system:
OS X
The text was updated successfully, but these errors were encountered: