Opened 17 years ago

Closed 16 years ago

Last modified 16 years ago

#1036 closed Bug (worksforme)

IE uploading problem in different encoding environments

Reported by: Lukasz Frankowski Owned by:
Priority: Normal Milestone:
Component: File Browser Version: FCKeditor 2.4.3
Keywords: Pending Cc:


There is a problem with uploading files in PHP version of filebrowser under the Windows using IE, if your Windows uses different charset encodings (eg. my - Central Europe WIN-1250). The fckeditor browser pages are encoded in UTF-8, which is good choice, but the suck IE browser has the next of hundreds bugs I've encountered doing tests of our system in Windows. When the page is UTF-8 encoded, it encodes the filename of uploading file anyway in its current encoding, and the request to the server contains this name. The result is unreadable name on the server side, and the filemanager alert window with invalid response (the filename cannot be properly identified and file cannot be deleted event through ftp).

Having looked at the web, I've notice, that the problem is not only present for Central European encoding, but for other languages using special characters and using its own encoding in Windows also. The workaround to solve this problem can be set the filename at the server side using rawurlencode() (in the commands.php::FileUpload. When I've changed:

// $sFileName = $oFile['name'];
$sFileName = rawurlencode($oFile['name']);

The browser works, the special chars of filenames are encoded using % characters, but there's still problem with downloading file, because their names are backward re-encoded with the browser using the old encoding (stored in %-chars) which is incorrect downloading files from UTF-8 encoded pages.

So, maybe the good choice will be remove all non-alphanum characters from the filename to solve this?

Change History (7)

comment:1 Changed 17 years ago by Frederico Caldeira Knabben

Can you point us to any online reference you may have found about this issue?

comment:2 Changed 17 years ago by Lukasz Frankowski

Well, I've had more time now for investigation, and I've made some tests. It's not the problem I thought. It seems to be the problem of filesystem and the website encoding. I've tried to upload files through fckeditor to various providers and for some of them the error emerges. I think that their filesystems are non-UTF-8 (I have no shell account there) and the filename is. In this case, when the filename has 'special' characters, the filename is corrupted and:

  • the XML response to the browser is broken and the alert window with error appears
  • so the browser can't be used (even for other files)
  • the filename on the server filesystem is corrupted, that it can't be removed using ftp
  • but the php filemanager I've installed there has removed the file

I have no other conclusions for now.

EG. The filename I tested under Windows containing my national chars is: 'ąśżźćń󳥌ŻŹĆŃÓŁ.txt', the Windows encoding is WIN-1250 and the host provider is

comment:3 Changed 17 years ago by Lukasz Frankowski

Note, that the problem is related to XML being an filebrowser interface - when the file on the server is different encoded than that XML encoding (i.e. UTF-8) the browser can't parse this XML and the filebrowser doesn't work. When I use simple PHP filemanager, I can read and delete the file, although they have corrupted names. The problem is occurs only if I upload file from Windows (win-1250) to unix system (utf-8) using IE.

comment:4 Changed 16 years ago by Alfonso Martínez de Lizarrondo

Could you check the nightly build?

#888 should have fixed the encoding problem for IE.

comment:5 Changed 16 years ago by Frederico Caldeira Knabben

Keywords: Pending added

comment:6 Changed 16 years ago by Alfonso Martínez de Lizarrondo

Resolution: worksforme
Status: newclosed


comment:7 Changed 16 years ago by Wiktor Walc

We're working on this issue in #1842.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy