Buy Now
Sign in

Corrupts file name

Hugamur , February 01 at 06:43
Answered
H
Hugamur

Hello.


In the ChronoForms I use a multi-file upload.
When the file name in English language is no problem.
But if the file name is in Russian language then the first word in the file name disappears.​

Look at this problem on Debugger screenshot.


​File name provider I use {var:upload4.file.name}.{var:upload4.file.extension}


​Sorry for my bad english

corrupts_file_name.png

admin
Hi Hugamur,
I checked the code and there is a PHP function will work correctly with the file name only if your server has the Russian locale installed/enabled.
You may also try to find the file name in the data array, where is the rest of the debug ?
Best regards
Max
If your main question got answered then please mark the answer using the button!​
​Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
H
Hugamur
My server is located in Russia. The server uses PHP version 7.0
Link to my form is here. Debugger is on.
Full debug log.​
Array​
​(​
​ [view] => form​
​ [chronoform] => internet_priemnaya_v2​
​ [event] => submit​
​ [Obrashhaetes_kak] => Fiz_Lico​
​ [Familiya] => test​
​ [Imya] => test​
​ [Otchestvo] => test​
​ [Nazvanie_organizacii] => ​
​ [Kontaktnyj_telefon] => +1(111)111-1111​
​ [E-mail] => test@test.ru​
​ [Pochtovyj_adress] => test​
​ [Tekst_obrashheniya] => test​
​ [Otvet_poluchit] => pochtoviy-adress​
​ [file19] => Array​
​ (​
​ [0] => экрана от 2017-09-07 17-26-14.png​
​ )​
​​
​ [Soglasen_na_obrabotku_personalnyh_dannyh] => да​
​ [g-recaptcha-response] => 03AA7ASh0epS8VNsjQZv-11zG_Slyt-lQxndqYPBbgIp65Zmbs7Sysgqxc3IRA4wC1XSQE2e1zLaJjtnXTBvLgj_dBkLFgmb0ciSjjjjV2p_YC66XC18xXwAFpB2GOxB582SkNeOufbNJL2NtaNhosydlfpf5noLE-YKo99UzqVjaZuSuWeexfGktUSljO5ItISFsfWaFNQRUhmH51RUj74BUVik3mtunBwItolSU7z-hWMNydfa22SN29lJy654UEhtZLqWeyLbU9xTfqqt2oSx2ipMgHgWCnCjoH0NvIjypJ6fZnEGPwvt2FXwSNa-PQ0wIEUcZwAzqiMHUuh1HEsM7NCgV4-ZDQt5YB4nsZhC2fPAzooO9PIntODux6NvqGbWw1Qz_CJJHfBTFmjNna7CwgdRwJwErCTwOMYOdDg8iTCCMK_g6_FxM​
​ [button_send] => ​
​ [Itemid] => 386​
​ [option] => com_chronoforms6​
​)​
​​
​Array​
​(​
​ [upload4] => Array​
​ (​
​ [path] => /home/clients/huga_ftp1/domains/kacha-mo.ru/html/components/com_chronoforms6/chronoforms/uploads/​
​ [file19] => Array​
​ (​
​ [extensions] => Array​
​ (​
​ [0] => odt​
​ [1] => doc​
​ [2] => docx​
​ [3] => pdf​
​ [4] => txt​
​ [5] => ods​
​ [6] => xls​
​ [7] => xlsx​
​ [8] => jpg​
​ [9] => png​
​ [10] => gif​
​ )​
​​
​ [saved] => 1​
​ )​
​​
​ [var] => Array​
​ (​
​ [file19] => Array​
​ (​
​ [0] => Array​
​ (​
​ [path] => /home/clients/huga_ftp1/domains/kacha-mo.ru/html/components/com_chronoforms6/chronoforms/uploads/ экрана от 2017-09-07 17-26-14.png​
​ [filename] => экрана от 2017-09-07 17-26-14.png​
​ [name] => Снимок экрана от 2017-09-07 17-26-14.png​
​ [size] => 275648​
​ )​
​​
​ )​
​​
​ )​
​​
​ )​
​​
​ [google_nocaptcha7] => Array​
​ (​
​ [response] => Array​
​ (​
​ [success] => 1​
​ [challenge_ts] => 2018-02-12T05:53:45Z​
​ [hostname] => www.kacha-mo.ru​
​ )​
​​
​ [_success] => The NoCaptcha verification was successfull.​
​ [var] => 1​
​ )​
​​
​ [save_data9] => Array​
​ (​
​ [data] => Array​
​ (​
​ [created] => 2018-02-12 05:54:58​
​ [user_id] => 0​
​ [Obrashhaetes_kak] => Fiz_Lico​
​ [Familiya] => test​
​ [Imya] => test​
​ [Otchestvo] => test​
​ [Nazvanie_organizacii] => ​
​ [Kontaktnyj_telefon] => +1(111)111-1111​
​ [E-mail] => test@test.ru​
​ [Pochtovyj_adress] => test​
​ [Tekst_obrashheniya] => test​
​ [Otvet_poluchit] => pochtoviy-adress​
​ [file19] => [" экрана от 2017-09-07 17-26-14.png"]​
​ [Soglasen_na_obrabotku_personalnyh_dannyh] => да​
​ )​
​​
​ [_success] => Data saved successfully​
​ [log] => Array​
​ (​
​ [0] => INSERT INTO `kmo_chronoforms_data_internet_priemnaya_v2` (`created`, `user_id`, `Obrashhaetes_kak`, `Familiya`, `Imya`, `Otchestvo`, `Nazvanie_organizacii`, `Kontaktnyj_telefon`, `E-mail`, `Pochtovyj_adress`, `Tekst_obrashheniya`, `Otvet_poluchit`, `file19`, `Soglasen_na_obrabotku_personalnyh_dannyh`) values ('2018-02-12 05:54:58', '0', 'Fiz_Lico', 'test', 'test', 'test', '', '+1(111)111-1111', 'test@test.ru', 'test', 'test', 'pochtoviy-adress', '[" экрана от 2017-09-07 17-26-14.png"]', 'да');​
​ )​
​​
​ [var] => Array​
​ (​
​ [created] => 2018-02-12 05:54:58​
​ [user_id] => 0​
​ [Obrashhaetes_kak] => Fiz_Lico​
​ [Familiya] => test​
​ [Imya] => test​
​ [Otchestvo] => test​
​ [Nazvanie_organizacii] => ​
​ [Kontaktnyj_telefon] => +1(111)111-1111​
​ [E-mail] => test@test.ru​
​ [Pochtovyj_adress] => test​
​ [Tekst_obrashheniya] => test​
​ [Otvet_poluchit] => pochtoviy-adress​
​ [file19] => [" экрана от 2017-09-07 17-26-14.png"]​
​ [Soglasen_na_obrabotku_personalnyh_dannyh] => да​
​ [aid] => 5​
​ )​
​​
​ )​
​​
​)​
admin
Hi Hugamur,
Please try to add this line of code in a PHP block ABOVE the upload action:
setlocale(LC_ALL,'ru_RU.UTF-8');
If this does not work then please wait for the new update (scheduled for later today) and use this syntax in the filename provider:
{var:upload4.file.fullname}
to get the original file name
Best regards
Max
If your main question got answered then please mark the answer using the button!​
​Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
H
Hugamur
Thank you. This solution helped me
Please try to add this line of code in a PHP block ABOVE the upload action:​
setlocale(LC_ALL,'ru_RU.UTF-8');