WebDAV plugin bug: incorrect names with non-ASCII characters

Please report only one bug per message!

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
strannik
New Member
New Member
Posts: 1
Joined: 2015-09-20, 23:25 UTC
Location: Russia, Nizhny Novgorod
Contact:

WebDAV plugin bug: incorrect names with non-ASCII characters

Post by *strannik »

Some WebDAV servers (for example python wsgidav server) could return XML with header string <?xml ... encoding='UTF-8' ?> where encoding param is defined with only single quotes. But as I understand TC WebDAV plugin in such case couldn't detect characters encoding in correct way. So all names (files and folders) with non-ASCII characters are displaying incorrect.

As I see there is the mistake in davfunc.cpp on line 2663:

Code: Select all

if (p) {
    p+=9;
    while (p[0]=='"' || p[0]==' ' || p[0]=='\r' || p[0]=='\n' || p[0]=='\t')
        p++;
    if (strnicmp(p,"utf-8",5)==0)
        return BODY_UTF8;
}
It would be nice to add single qoute check in "while" statement.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Thanks for the info, I will add it to the plugin.
Author of Total Commander
https://www.ghisler.com
Post Reply