• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
File Upload Bug for Thai Language

I found bug that when I upload my thai name pic with File Uploading Class

It will convert from this


to this


and in the dabase will be


I know the solution for this (set 'encrypt_name' to TRUE) but I want it to not encrypt my file name. How can i fix this bug? Help me plz.

[eluser]Iván Argulo[/eluser]
Could you transcript the filenames? Sadly, I don't understand Thai...

Setting the 'encrypt_name' to true will encode the filename, no matter anything else.

Here is my thai pic name.

[eluser]Iván Argulo[/eluser]
You posted the image, not the name Wink anyway, you can choose a filename for your new uploaded file. How do you get the filename? Could you post some code?

Sorry, This is my file name "รูปภาพตัวเอง.jpg"
if (!$answer_broken && ! $this->upload->do_upload($upload_files)){
    $upload_success = false;
    $upload_error = array('error' => $this->upload->display_errors());
    $errors = '';
    foreach ($upload_error as $error){
        $errors .= $error;
    $data['errors'] = $errors;
    $pic_data =  $this->upload->data();
        $subscriber->picture_path = $pic_data['picture']['file_name'];
        $subscriber->portfolio_path = $pic_data['portfolio']['file_name'];
        $subscriber->picture_path = $pic_data['file_name'];

This is my code that do_upload() and save information to database (I use DataMapper for Model)

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.