orig_name wrong in upload->data() array - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: orig_name wrong in upload->data() array (/showthread.php?tid=18003) |
orig_name wrong in upload->data() array - El Forum - 04-22-2009 [eluser]himself[/eluser] Hi, couldn't find this anywhere so posting it here, presumably a bug Using the upload class, and uploading files with speical characters (here Hebrew), the returned array is wrong, whereas the $_FILES['Filedata']['name'] is correct (so it's prob. not the server). //uploading af file called: רפי גדרון.wmv $data = $this->upload->data(); echo $data['orig_name']; // empty string echo $_FILES['Filedata']['name']; "רפי גדרון.wmv" Hope the hebrew chars makes it through the posting cheers orig_name wrong in upload->data() array - El Forum - 04-23-2009 [eluser]pistolPete[/eluser] I could partly reproduce your issue: View upload.php: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" View upload2.php Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" Controller test.php: Code: <?php if (!defined('BASEPATH')) exit('No direct script access allowed'); Only if I use "charset=utf-8" in view upload.php, CodeIgniter gets the correct file name. orig_name wrong in upload->data() array - El Forum - 04-23-2009 [eluser]himself[/eluser] Looks correct, I don't there is no html on my page so the only thing setting the charset is the settings from config/config.php (or is it config/database.php). Which as stated fails. |