core icon indicating copy to clipboard operation
core copied to clipboard

“Ü” in Folder names

Open Blaimi opened this issue 13 years ago • 37 comments

There is a problem if a foldername begins with the german letter „Ü“

After uploading a Folder sync failes and the letter is not shown in the webinterface (e.g. “Übungen” is shown as “bungen”).

Mirall is searching for “bungen” but can’t find it. On the filesystem it is stored correct.

Blaimi avatar Jan 28 '13 01:01 Blaimi

Correcting the foldername in oc_fscache works

Blaimi avatar Jan 28 '13 02:01 Blaimi

Files beginning with “Ü“ are not found by mirall and will be deleted on the client-folder.

Blaimi avatar Jan 28 '13 03:01 Blaimi

Please use our issue template as described in CONTRIBUTION. MD.

we cannot help if we don't know your environment. 

-------- Ursprüngliche Nachricht -------- Von: Blaimi [email protected] Datum:
An: owncloud/core [email protected] Betreff: [core] “Ü” in Folder names (#1336)

There is a problem if a foldername begins with the german letter „Ü“

After uploading a Folder sync failes and the letter is not shown in the webinterface (e.g. “Übungen” is shown as “bungen”).

Mirall is searching for “bungen” but can’t find it. On the filesystem it is stored correct.

— Reply to this email directly or view it on GitHub.

DeepDiver1975 avatar Jan 28 '13 06:01 DeepDiver1975

I can't reproduce this problem with ownCloud Server 4.5.6 on Linux with MySQL database and syncing between Windows client 1.2.0, Linux client 1.1.4 and Android App 1.3.18

Creating, renaming, deleting, accessing or moving Folders with Ü as first letter works both locally and in the webinterface.

noigeaR avatar Jan 28 '13 10:01 noigeaR

Operating system: Debian 6.0 squeeze Web server: Apache 2 PHP version: 5.3.3 Database: MySQL 5.1.66 ownCloud version: 4.5.6 (http://h2124669.stratoserver.net/phpinfo.php)

@ninjingames: How did you create the folder? Creating folders in the webinterface works fine, but if you create them via csync/mirall the generation of correct fscache-rows fails. It also fails at the recreation after truncating the fscache-table

Blaimi avatar Jan 28 '13 14:01 Blaimi

Creating folders in the webinterface works fine, but if you create them via csync/mirall the generation of correct fscache-rows fails.

Could you test if it works with a "normal" WebDAV client?

LukasReschke avatar Jan 28 '13 14:01 LukasReschke

@Blaimi I've created a new folder in my shared directory on Win7 called Übungen1 which was correctly synced to the server by the 1.2.0 Windows client. Then I've created a new directory Übungen2 on my Linux machine which was also correctly synced to the server by the 1.1.4 Linux client (from the Fedora 18 repo, which unfortunately still isn't updated to the latest 1.2.0 client). I've made a third directory called Übungen3 via webinterface. All 3 directories were properly synced to all connected clients and they are correctly displayed as Übungen with the capital Ü in the webinterface.

I've also moved some files in and out of the directories on the clients and the webinterface, renamed directories, deleted and recreated them and everything works as expected.

I'm also running the ownCloud server on Debian 6.0 squeeze, same versions for MySQL, PHP and Apache as you are. I've installed ownCloud via the opensuse repo linked to from owncloud.com

noigeaR avatar Jan 28 '13 15:01 noigeaR

@blaimi Usually in cases where umlauts are not properly displayed on Linux server environments we suggest to install the locale en_US.UTF8. I assume this is not possible for you within the strato web space. Can you contact support and ask if the locale is installed?

DeepDiver1975 avatar Jan 28 '13 19:01 DeepDiver1975

This server is UTF8! Trust me ;)

After creating the folder “Übungen” via nautilus’ webdav-interface, the folder was after a “F5” renamed to “bungen” → HTTP: 404

Blaimi avatar Jan 29 '13 01:01 Blaimi

Please have a look at your admin screen within ownCloud. In case the correct locale is not available on your server or cannot be set you will see a warning. Alterntive: have a look at data/owncloud.log

DeepDiver1975 avatar Jan 29 '13 08:01 DeepDiver1975

Bildschirmfoto vom 2013-01-29 10:46:06

No difference between creating per dav or webinterface. Opening “wrong” folders causes an error.

owncloud.log: {"app":"core","message":"unable to rename, file is not writable : files/…/bungen","level":3,"time":1359336570}

The file does not exist.

Blaimi avatar Jan 29 '13 09:01 Blaimi

I'm pretty sure this is a locale issue. We change the local within our php code to en_US-UTF8. I case the locale is not installed or named different umlauts will break.

Please attach a screen shot if your admin screen Thx

DeepDiver1975 avatar Feb 10 '13 10:02 DeepDiver1975

I can reproduce this error. Same problem here, with webdav and the mirall linux client. If i upload the folder named Öjendorf via webdav the Ö (umlaut) gets lost.

I changed my language to deutsch (german) but the error is the same.

The folder is added correctly in the filesystem:

$ ls data/jan/files/Öjendorf/

Any ideas? How can I help to fix this?

I digged a bit around in the source and the database and found that it seems to be written wrong to the database:

mysql> select path,name from oc_fscache; +--------------------------------+---------------------+ | path | name | +--------------------------------+---------------------+ | /jan/files | files | | /jan/files/flowPeaks-guide.pdf | flowPeaks-guide.pdf | | /jan/files/Öjendorf | jendorf |

jcmeier avatar Feb 13 '13 15:02 jcmeier

@codejunky what's your server environment?

DeepDiver1975 avatar Feb 15 '13 12:02 DeepDiver1975

@Blaimi please attache a screenshot for your admin page within owncloud - THX

DeepDiver1975 avatar Feb 15 '13 12:02 DeepDiver1975

@DeepDiver1975 my server environment is the following:

debian 6.0.4

$ php -v PHP 5.3.3-7+squeeze9 with Suhosin-Patch (cli) (built: May 9 2012 07:20:37)

$apache2 -version Server version: Apache/2.2.16 (Debian)

The client side is fedora 18

jcmeier avatar Feb 15 '13 12:02 jcmeier

@codejunky THX please make sure the locale en_US.UTF8 is installed.

Please run:

$ more /etc/locale.gen | grep en_US

DeepDiver1975 avatar Feb 15 '13 13:02 DeepDiver1975

@DeepDiver1975 Yes. It is definetly a locale issue. The locale en_US is not installed on my server. I tried with another server which has en_US enabled and it works fine there.

Maybe the installer should check whether the locale is available/installed? :-)

jcmeier avatar Feb 15 '13 13:02 jcmeier

@codejunky have a look at your admin section - a clear warning is displayed.

for OC5 we will be a warning during installation.

DeepDiver1975 avatar Feb 15 '13 13:02 DeepDiver1975

My MySQL-general_log said that the query from filecache.php:112 doesn’t work as it should. I think there is some bug in my php “basename()”?! Changing the line as shown in the patch fixed the problem. After the change I did a “TRUNCATE TABLE oc_fscache” and oc rebuilt it. I checked every insertion with umlauts while scanning with xdebug and not a single one went wrong.

BTW: how can I attach files to the issue?

--- filecache.php   2013-01-21 21:47:28.000000000 +0100
+++ filecache.new.php   2013-02-15 19:36:36.208501657 +0100
@@ -108,8 +108,9 @@
        $data['writable']=(int)$data['writable'];
        $data['encrypted']=(int)$data['encrypted'];
        $data['versioned']=(int)$data['versioned'];
+       $basename=basepath($fullpath);
        $query=OC_DB::prepare('INSERT INTO `*PREFIX*fscache`(`parent`, `name`, `path`, `path_hash`, `size`, `mtime`, `ctime`, `mimetype`, `mimepart`,`user`,`writable`,`encrypted`,`versioned`) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?)');
-       $result=$query->execute(array($parent,basename($fullpath),$fullpath,md5($fullpath),$data['size'],$data['mtime'],$data['ctime'],$data['mimetype'],$mimePart,$data['user'],$data['writable'],$data['encrypted'],$data['versioned']));
+       $result=$query->execute(array($parent,$basename,$fullpath,md5($fullpath),$data['size'],$data['mtime'],$data['ctime'],$data['mimetype'],$mimePart,$data['user'],$data['writable'],$data['encrypted'],$data['versioned']));
        if(OC_DB::isError($result)) {
            OC_Log::write('files','error while writing file('.$fullpath.') to cache',OC_Log::ERROR);
        }

Blaimi avatar Feb 15 '13 18:02 Blaimi