Welcome to ProjeQtOr new Forum. We migrated old forum to the new website.
You will find all your posts here, with your usual account.
Just one point : you’ll have to reinitialize your password. Use “Lost password” feature.
Whenever I upload a file name with greek characters, the file's name become strange characters
e.g
I want to upload www-ΕΛΛ.txt
and in the db the file is stored as www-ÎÎÎ.txt
And how is it retrieved (downloaded) ?
NB : there are some mandatory trnasformations in file name because most OS (including linux) cannot store files with special characters.
As www-ÎÎÎ.txt
No problem here. But we cannot understand which file it is
All files are renamed as attachement_xx
The problem is in the gui. I think that it has something to do with the storage of the filename in the db
All other works fine.
I can write and read greek characters everywhere in projeqtor
The characters in db are readable as greek characters
I have mb_string enabled for projeqtror
The database is utf8
Tables are utf8_general_ci
Columns are utf8_general_ci
I have $enforceUTF8=true;
The only problems are attachements
Some more info
-I use Projeqtor 4.5.2
- I had not this problem before (I already have attachements with Greek characters)
- I use a Linux Debian server
- Mysql Variables (I think that I have ut8 database system)
character set client utf8
character set connection utf8
character set database utf8
character set filesystem binary
character set results utf8
character set server utf8
character set system utf8
collation connection utf8_general_ci
collation database utf8_general_ci
collation server utf8_general_ci
- The notes in the activity are Greek
- The note IN the attachement is not readable
Settings in my.cnf
collation_server=utf8_general_ci
character_set_server=utf8
I think that sth is wrong, but I don't think this is the database setup.
One more info
I changed the unreadable characters directly in db (for testing purposes) and the result was ok
I could see the greek characters.
But can you still donwload the file ?
Yes I can download it.
But I found sth else:
if my mbstring settings are like this:
mbstring.language = Neutral
mbstring.internal_encoding = UTF-8
mbstring.http_input = auto
mbstring.http_output = UTF-8
mbstring.encoding_translation = On
mbstring.detect_order = UTF-8
mbstring.substitute_character = none
I see what I told you.
if my mbstring settings are like this:
mbstring.language = Neutral
mbstring.internal_encoding = UTF-8
mbstring.http_input = UTF-8
mbstring.http_output = UTF-8
mbstring.encoding_translation = On
mbstring.detect_order = none
mbstring.substitute_character = none
I see the correct characters only AND only if the first characters is not GREEK
so
with the second sets of settings
the file www-ΕΛΛ.txt appears as www-ΕΛΛ.txt (CORRECT)
the file ΕΛΛ.txt appears as .txt (WRONG)
the last problem exists also in the demo
check activity id 324 (project SGB)
Something that might help:
In
/web/tool/saveAttachement.php
in line 212
If I change
$attachement->fileName=basename($uploadedFile['name']);
to
$attachement->fileName=$uploadedFile['name'];
the file name is dispayed correctly and I can download it.
Good hint.
I will have a look.
You were right : basename() is not UTF8 secure unless setlocale() is called before.
Moreover, it was not usefull in that case, so removing it is best fix.
ALso done one addDocumentVerison.php (same issue).
Fix will be deployed on V4.5.3
Do you mean saveDocumentVersion.php?
Yes
