#344 WebDAV shows wrong folder when folder name is multi-byte str

Latest_version
open
nobody
WebDAV (8)
5
2012-11-27
2012-02-07
Anonymous
No

Simple Groupware version: 0.743
Simple Groupware language: Japanese (my original)
PHP Version: e.g. PHP 5.3.3
Database + Version: e.g. MySQL 5.0.77
Server OS: CentOS 5
Webserver: Apache 2.2.3
Used + Version: Firefox 10.0
Your role:Developer

My problem is ...
WebDAV shows wrong folder when folder name is multi-byte string.

It can be reproduced on a new installation by doing ...
1.Install SGS with default language(en)/
2 Access to "/sgdav/" folder with webDAV client and you will see "Workspace" folder.(correct)
3.Rename "Wprkspace" to some multi-byte string like "ワークスペース".
4 Access to "/sgdav/" again and you will see "sgdav" folder.(correct)

(identical)
<D:response
xmlns:lp1="DAV:"
xmlns:lp2="http://apache.org/dav/props/"
xmlns:ns1="urn:schemas-microsoft-com:">
<D:href>
/sgdav/Workspace
</D:href>

(invalid)
<D:response
xmlns:lp1="DAV:"
xmlns:lp2="http://apache.org/dav/props/"
xmlns:ns1="urn:schemas-microsoft-com:">
<D:href>
/sgdav/sgdav
</D:href>

I fount the rule:

(identical case)
Folder A
Folder B
Folder C

and >dir A returns
Folder B
Folder C
(correct)

(invalid case)
Folder A
Folder あ
Folder C

and >dir A returns
Folder A
Folder C
(invalid)

internal folder structure must be serialized like "Folder A, Folder あ,Folder C"
and if folder name includes Multi-byte character, dav returns a previous entry.

For "Workspace" and "ワークスペース", preceding entry must be "sgdav" and
initial request returned /sgdav/Workspace became /sgdav/sgdav.

regars.
Kayo

Discussion

  • Thomas Bley

    Thomas Bley - 2012-02-07

    Hello,

    you can try to add this line to your "<sgs-dir>/simple_store/config.php":
    setlocale(LC_ALL, 'ja_JP.UTF8');

    bye
    Thomas

     
  • Thomas Bley

    Thomas Bley - 2012-02-07

    Hello,

    when opening the PHP console in the administration overview page, this code:
    setlocale(LC_ALL, 'ja_JP.UTF8');
    echo basename("/sgdav/ワークスペース");

    should give:
    ワークスペース

    You can also try:
    setlocale(LC_ALL, 'en_US.UTF8');
    echo basename("/sgdav/ワークスペース");
    // should give the same result

    Please let me know if both work.

    bye
    Thomas

     
  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2012-02-09

    YES, it worked!

    Default instalattion
    echo basename("/sgdav/ワークスペース");
    >sgdav

    after
    setlocale(LC_ALL, 'ja_JP.UTF8');
    echo basename("/sgdav/ワークスペース");
    >ワークスペース

    setlocale(LC_ALL, 'ja_JP.UTF8');
    setlocale(LC_ALL, 'en_US.UTF8');
    did the same effect.

    I added setlocale(jp) to the end of config.php and now I can browse filesystem.
    (adding to second line caused error)

    I post and get files which uses multi-byte chars, both from webdav and web interface,too.
    Another ticket (3484876) seems to be same problem and can be closed.
    I'll try with real data for a while.

    Greatest thanks and love.
    Kayo

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks