contao/issues — Issue #68: Can't create a new folder nor upload a file with File manager
Author: importer
Created: 2011-11-24 08:19:41+00:00
State: open
Labels: backend, Defect

Hi,

I'm fairly new to TYPOlight and tried to install it and things almost went fine. But when I tried to create a new folder with File manager, I couldn't create any folder.

Backend didn't show any error and there was a strange line in System log.

```
[2008-09-03 10:01] Folder "tl_files/" has been created
```

Finally, I found the problem came from bad usage of iconv(). At function utf8_convert_encoding() in system/mbstring.php:

```
if (function_exists('iconv'))
return @iconv($from, $to . '//IGNORE', $str);
```

Here uses "//IGNORE" which is GNU iconv own extention. Most other implementation of iconv(3), this extention ("//IGNORE" and "//TANSLIT") aren't part of standard (such as POSIX).

As a result, utf8_convert_encoding() returns empty string. (Unfortunately, there was no error check for this iconv() failure.)

One solution is using GNU iconv with PHP iconv module. But it should be avoid using such none portable use of iconv() function.

I don't have good idea how to avoid using "//IGNORE" in this case since I'm not a experienced PHP programmer.

Operating System: NetBSD current (4.99.72)
WebServer: Apache 2.2.9
Database: MySQL 5.0.51b
PHP: PHP-5.2.6

Best regards.

--
Takahiro Kambe

system/mbstring.php uses none-portable iconv() usage.

[Download the attachments](http://www.contao.org/tl_files/tickets/68.zip "Download the attachments of this ticket")

--- _Originally created by taca on September 7th, 2008, at 03:38am (ID 68)_