#1842: Filename escape/encode problem causes XML error in file browser
---------------------------+------------------------------------------------
  Reporter:  Dynom         |       Owner:  wwalc          
      Type:  Bug           |      Status:  assigned       
  Priority:  Normal        |   Milestone:                 
 Component:  File Browser  |     Version:  FCKeditor 2.5.1
Resolution:                |    Keywords:  Confirmed      
---------------------------+------------------------------------------------
Comment (by wwalc):

 This issue has been also described in #1036.

 The main problem is that in some of the html files used by file browser
 utf-8 headers were missing:
 {{{
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 }}}

 Because of that, IE sent file names in its internal system encoding,
 whilst everyting was working fine in Firefox (used utf-8 as a defult to
 send names of uploaded files). Acutally FCKeditor could work fine even in
 IE, if utf-8 encoding was forced by apache configuration.

 Anyway, utf-8 headers must be set in all pages which are responsible for
 managing files. This will fix problems with uploading files in IE in the
 future.

 However, we have still unresolveable problem with files that have been
 already uploaded (...or have been uploaded by poor FTP client). Their name
 may be an invalid utf-8 string, which breaks XML responses in IE (Firefox
 ignores that problem). To fix that, ConvertToXmlAttribute function on *nix
 systems must check whether file name is a valid utf string: if not, encode
 it *somehow*. We have no information what was the initial encoding that IE
 had used, so we could use utf8_encode which is available in core in all
 PHP versions. It encodes string assuming that given string is encoded in
 ISO-8859-1.

 Unfortunately it means that if someone uploaded file in IE and his Windows
 used different charset than ISO-8859-1, his file will be displayed, but
 its name will be wrong (due to wrong encoding used in conversion). But
 this is still a lot better that being unable to display the list of files.


 To completely fix this issue, we would have to be able to sent non-utf
 file names in XML responses, so file names would have to be sent in
 rawurlencoded format.

-- 
Ticket URL: <http://dev.fckeditor.net/ticket/1842#comment:5>
FCKeditor <http://www.fckeditor.net>
The text editor for Internet
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
FCKeditor-Trac mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fckeditor-trac

Reply via email to