Skip to content

(file / folder) names starting with an accentued char #1783

Closed

Description

@quenenni

Expected behaviour

We can have filenames and foldernames starting with an accentued char (â, É, ..).

Actual behaviour

The first char is cut (Édition becomes ditions) -> impossible to access / rename / delete them.
The filename is good on the server and no problem when the accent is not the first char
(rescanning the files doesn't resolve the issues)

In the DB, we can see in fscache table

  • before renaming:
    (id, path, path_hash, parent, name, user, size, ctime, mtime, mimetype, mimepart, encrypted, versioned, writable)
    VALUES
    (13, '/admin/files/aa', 'c7219caba8fd4cc968838da48108832e', 1, 'aa', 'admin', 0, 1361292048, 1361292048, 'application/x-empty', 'application', 0, 0, 1);
  • after renaming:
    (id, path, path_hash, parent, name, user, size, ctime, mtime, mimetype, mimepart, encrypted, versioned, writable)
    VALUES
    (13, '/admin/files/éaa', '3a3d7547902e55bb09fd47b9d2443b40', 1, 'aa', 'admin', 0, 1361292048, 1361292048, 'application/x-empty', 'application', 0, 0, 1);

(the field 'path' seems good but the field 'name' didn't change)

Steps to reproduce

  1. Upload a file (or create a empty file), rename it an put an accentued char at the beginning.
    Reload the Files page, the first char is cut (Édition -> ditions)
  2. Using the "Rescan Filsystem" app when there are already lots of files / folders from before the upgrade make impossible to access all the files / folders that start with an accentued char.
    As for point 2, all the names don't have anymore the first char in their name

But the files / folders on the server are good.

Server configuration

Operating system: Debian squeeze 6.0.6

Web server:
ii apache2 2.2.16-6+squeeze10
ii apache2-mpm-prefork 2.2.16-6+squeeze10
ii apache2-utils 2.2.16-6+squeeze10
ii apache2.2-bin 2.2.16-6+squeeze10
ii apache2.2-common 2.2.16-6+squeeze10

Database:
ii mysql-server 5.1.66-0+squeeze1
ii mysql-server-5.1 5.1.66-0+squeeze1
ii mysql-server-core-5.1 5.1.66-0+squeeze1

PHP version:
ii php-pear 5.3.3-7+squeeze14
ii php-xml-parser 1.3.2-4
ii php5 5.3.3-7+squeeze14
ii php5-cli 5.3.3-7+squeeze14
ii php5-common 5.3.3-7+squeeze14
ii php5-curl 5.3.3-7+squeeze14
ii php5-dev 5.3.3-7+squeeze14
ii php5-gd 5.3.3-7+squeeze14
ii php5-mcrypt 5.3.3-7+squeeze14
ii php5-mysql 5.3.3-7+squeeze14
ii php5-sqlite 5.3.3-7+squeeze14
ii php5-suhosin 0.9.32.1-1

ownCloud version:
'version' => '4.90.7'

Locale (active):
fr_FR.UTF-8@euro

Locale (also installed):
en_GB.UTF-8 UTF-8

Client configuration

Browser:
Iceweasel 20.0a2 (2013-02-01)
srWare Iron Version 22.0.1250.0 (158531)

Operating system:
Debian squeeze

Logs

Web server error log

ownCloud log (data/owncloud.log)

Nothing when I rename a file or do a rescan.
After a rename, if I try to rename it again, I have:
{"app":"core","message":"unable to rename, file is not writable : files/aaa","level":3,"time":1361291596}

Browser log

JS console on rename:
https://cloud.domainepublic.net/actic/?app=files&getfile=ajax/rename.php&dir=%2F&newname=%C3%A9bb&file=bb
Response:
{"data":{"dir":"/","file":"bb","newname":"\u00e9bb"},"status":"success"}

Activity

  1. LukasReschke commented on Feb 19, 2013

    @LukasReschke
    Contributor

    Could you try to install the en_US.UTF-8 locale?

  2. LukasReschke commented on Feb 19, 2013

    @LukasReschke
    Contributor

    Related to #1123

  3. quenenni commented on Feb 19, 2013

    @quenenni
    Author

    I installed en_US.UTF-8 and made it the default locale.
    I then remove the other locale to only keep en_US.UTF-8.

    the problem is still there.

  4. quenenni commented on Feb 19, 2013

    @quenenni
    Author

    hmmm.. The trick with the locales did something, but it's still very strange.

    Now, when I rename a file aaa -> éaaa, the 'name' field of the fscache table is good.
    That's a nice progress.

    But, in the webinterface, when I go in the Files page, the names are bad (the first char is not showed), but but but.,, the link to access them is good.
    So, I see the file aaa, but the link is /?app=files&getfile=download.php?file=/%C3%A9a%C3%A9a

    What is more strange is that sometimes after opening a file and then coming back in the Files page, the names are good, but not often, and only after having opened a document (I don't understand why as the link to access the Files page is the same all the time)

    PS: sorry for the related bug. I searched before posting my bug but missed that one.

  5. quenenni commented on Feb 19, 2013

    @quenenni
    Author

    ok.. it seems the problem is gone.

    I emptied the fscache table for a project that has lots of files, did a rescan and all the problematics files / folders are good now.

    On my test instance, I did the same and all is good too.

    The trick was simply to empty the table fscache and do a Rescan.

    Thanks for your help Lukas.

  6. locked as resolved and limited conversation to collaborators on Aug 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions