You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Problems with multibyte unicode characters in filenames #4513
I really wonder if we shall support all kinds of crazy characters out there.
No clue what will happen once we sync a file name with such a character to Windows
"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.
private function slugify($text)
{
// replace non letter or digits or dots by -
$text = preg_replace('~[^\pL\d.]+~u', '-', $text);
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
Activity
georgehrke commentedon Aug 19, 2013
cc @icewind1991
DeepDiver1975 commentedon Aug 21, 2013
@georgehrke Is the locale en_US.UTF-8 installed? THX
georgehrke commentedon Aug 22, 2013
Yes and it's the only enabled in /etc/locale.gen
DeepDiver1975 commentedon Aug 22, 2013
What unicode character did you use?
It's working on my Debian 7 with the violin symbol http://de.wikipedia.org/wiki/%F0%9D%84%9E
georgehrke commentedon Aug 22, 2013
Pile of poo http://www.fileformat.info/info/unicode/char/1f4a9/index.htm
DeepDiver1975 commentedon Aug 22, 2013
hmm - browsers on my debian are not capable of displaying the character properly:
http://en.wikipedia.org/wiki/%F0%9F%92%A9
Nautilus can't either.
I really wonder if we shall support all kinds of crazy characters out there.
No clue what will happen once we sync a file name with such a character to Windows
natschil commentedon Aug 22, 2013
"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.
karlitschek commentedon Aug 26, 2013
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?
whitehairtong commentedon Mar 25, 2014
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.
private function slugify($text)
{
// replace non letter or digits or dots by -
$text = preg_replace('~[^\pL\d.]+~u', '-', $text);
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
LukasReschke commentedon Mar 25, 2014
Related: https://dev.mysql.com/doc/refman/5.5/en/charset-unicode-utf8mb4.html
9 remaining items
PVince81 commentedon Dec 12, 2016
@DeepDiver1975 doctrine migrations merged. Can you move forward with the 4 byte unicode PR ?
michaelstingl commentedon Dec 20, 2016
for reference: 00006329
cdamken commentedon Mar 7, 2017
Hi Guys, could you please tell me some feedback from this issue?
DeepDiver1975 commentedon Mar 8, 2017
Fixed with oc10
PVince81 commentedon Mar 8, 2017
raise doc ticket for configuration hints: https://github.com/owncloud/documentation/issues/2924
lock commentedon Aug 2, 2019
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.