0

I am using a php framework called Scriptcase, so in this framework i have a simple form and a file input in order to upload my files into the server.

Localhost when i am uploading greek named files from my pc (jpg, png etc..) everything works fine. For example if have a file named ελλαδα0123.png it is uploaded correctly into to my server.

But in the Production env, if i go to upload the exact same file named "ελλαδα0123.png" it's uploaded like that ΕΥΔΑΠ ΠΕΙΡΑΙΞ0123.png.

I think is a problem with the encoding, but this is only happeping when it comes to uploading greek named files into the production environment. If i upload files named in english characters everything works fine everywhere (localhost and production env). Note: I have never had a problem with the database (sql) utf-8 characters.

Do anyone know why is this happening in the production environment only? Thank you.

`// This is my code

sc_api_download([
'settings' => [
'gateway' => 'dropbox',
'api_key' => {apikey},
'api_secret' => {apisecret},
'access_token' => {accesstoken},
],
  'file' => $usersFile,
  'destination' => tmp/files/,
]);

// At the end of the script the framework itself is doing the execution (uploading the file)`
  • I had something similar recently with `file_exists` returning false with accented characters, does `utf8_decode($usersFile)` help you? – Kaddath May 09 '23 at 09:07
  • If i `echo utf8_decode($usersFile)` i get `??????0123.png` which is my file ελλαδα0123.png – One Programmer May 09 '23 at 09:15
  • Yes in my case too, the display may be wrong, but the function worked, just thought it could help you but I wasn't sure.. you can still give it a try – Kaddath May 09 '23 at 09:18
  • Does this answer your question? [UTF-8 all the way through](https://stackoverflow.com/questions/279170/utf-8-all-the-way-through) – Ken Lee May 09 '23 at 09:20
  • @KenLee I will test it and i will you give a feedback thanks – One Programmer May 09 '23 at 09:28

0 Answers0