Share » Forums » Developer » Webdav upload + unicode = bug ?

Webdav upload + unicode = bug ?

Webdav upload + unicode = bug ?

Tuesday 02 August 2005 11:33:08 pm - 5 replies

Author Message

Xavier Dutoit

Wednesday 03 August 2005 1:42:02 am

Could you please clarify where you're adding the upload handler and what is you ez version ?

Also, I quite don't get where is the problem: when you're adding the content or when you're trying to see it ?

There is a bug in the webdav (brower part): when it contains accentued chars, it doesn't display them (error message). I sent a patch to ez, don't know if they have fixed it yet. Might be related ?

X+

http://www.sydesy.com

Oree Eyo

Wednesday 03 August 2005 2:25:51 am

xavier.

First. Thanks for the webdav patch. I have it applied and It solved the problem of non-english file (object) names.
Maybe you can tell if it has something to do with my problem. Alltough this is not the browser part of the webdav.

This upload handler is reffered by upload.ini and called by ezp after detecting text/html mime upload this way :
[upload.ini]
MimeUploadHandlerMap[text/html]=myhandler

The idea is to create an article from the uploaded file.
This upload hanlder is called whenever I upload html document no matter if it's via webdav or via http://localhost/corporate_admin/content/upload/
But, as I mentioned above. unicode isn't stored correctly when I upload via webdav.

I think that there's no problem when I upload the content.
I mean. The upload is fine and a new object is created, but when I view it in the admin interface ( and also in the database using phpmyadmin) I see odd characters instead of my unicode text ( again. only if it was a webdav upload).

My ezp Version: 3.7.0rc1 (3.7.0rc1)
SVN revision: 12701

Oree Eyo

Friday 05 August 2005 12:53:16 am

last bump before a bug report...
anyone ?

Xavier Dutoit

Friday 05 August 2005 1:26:48 am

Don't know,

What is the encoding using for the webdav trafic vs. the regular one (have a look at the http headers with something like "live http headers" on firefox) ?

I'd guess that's different encodings, hence the pb, but that's a wild guess.

X+

P.S. If you post a bug report, please remind them about the patch I sent them, it seems to have been forgotten.

http://www.sydesy.com

Oree Eyo

Friday 05 August 2005 2:39:22 am

I'll give it a try but I'm not sure that "Sniffing" http traffic would say something, The problem is somewhere inside the informathion proccess. The following pice of code won't store data as unicode if webdav is calling it, regardless of what you upload.

$utf8text = "NON ENGLISH UNICODE TEXT";
$dataMap[$bodyAttribute]->setAttribute( 'data_text' $utf8text);
$dataMap[$bodyAttribute]->store();      

As you can see, the unicode text is inside the code.

HTTPCharset is set to utf-8 in i18n.ini

 
[CharacterSettings]
Charset=utf-8
HTTPCharset=utf-8
MBStringExtension=enabled

Maybe it doesn't apply to webdav.
I wonder if there's a "WEBDAVCharset=xyz". all tough webdav is on-top http so it should be the same.
gonna do that bug-report later on.

regards.

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu