View ProjeQtOr On SourceForge.net
ProjeQtOr - Project Management Tool
Support us on Capterra
OIN - Open Invention Network
ProjeQtOr free project management software - Attachments with non english characters - ProjeQtOr
 
 

Attachments with non english characters

More
15 Jan 2014 16:12 #1 by assospan
Dear all,

I am uploading files (attachments of projects) with non english characters and:

(1) inside the projeqtor application I can see the non english characters
(2) from projeqtor application, users can correctly download the files with non english characters. At "save as" the correctly see the non english characters
(3) inside mysql database I can correctly see the non english characters

In Windows, inside the folder of the attachments I can NOT see the non english characters. Ex. I see Κατάλογος_Τραπεζών.pdf as filename.

How can it be fixed?

Thank you in advance.

Please Log in or Create an account to join the conversation.

More
15 Jan 2014 17:42 #2 by babynus
Not easy.

This issue is due to Windows encoding whoich is not UTF-8.

You should replace, for instance, in /tool/saveAttchement.php, line 217 with :
$uploadfile = $uploaddir . iconv("UTF-8", "ISO-8859-9//TRANSLIT",$attachement->fileName);
with your own windows encoding (example is for turkish encoding, from example found on the web).

This may work... or not.
But then you'll also have to update the download.php procédure to retrieve the good file...

Good luck... :(

Babynus
Administrator of ProjeQtOr web site

Please Log in or Create an account to join the conversation.

More
16 Jan 2014 09:49 #3 by assospan
Thank you for the reply,

I edited "/tool/saveAttchement.php" and I can see correctly the non english chars in the windows attachment folder.

When I try to download the file using the projector application the download link does not respond.
What changes I have to make to "/tool/download.php" in order to download the non english attachments?

Thank you in advance.

Please Log in or Create an account to join the conversation.

More
16 Jan 2014 09:56 #4 by babynus
You have to do same encoding in the name of file to retrieve correct file (as you changed the name of the file saved to disk, but name stored in DB is not changes)

Babynus
Administrator of ProjeQtOr web site

Please Log in or Create an account to join the conversation.

More
16 Jan 2014 10:23 #5 by assospan
Thank you for the reply.

I'll try to edit download.php
I will update with my findings.

Please Log in or Create an account to join the conversation.

More
20 Jan 2014 11:28 #6 by assospan
Hi,

I managed to download correctly attachments with non english characters.
I edited the download.php the red line below:

if ($class=='Attachement') {
$path = str_replace('${attachementDirectory}', Parameter::getGlobalParameter('paramAttachementDirectory'), $obj->subDirectory);
$name = iconv("UTF-8","ISO-8859-7//TRANSLIT",$obj->fileName);
$size = $obj->fileSize;
$type = $obj->mimeType;
$file = $path . $name;
if (! is_file($file)) {
$file=addslashes($file);
}

Please Log in or Create an account to join the conversation.

Moderators: babynusprotion
Time to create page: 0.042 seconds

Cookies settings

×

Functional Cookies

Ce site utilise des cookies pour assurer son bon fonctionnement et ne peuvent pas être désactivés de nos systèmes. Nous ne les utilisons pas à des fins publicitaires. Si ces cookies sont bloqués, certaines parties du site ne pourront pas fonctionner.

Session

Please login to see yours activities!

Other cookies

Ce site web utilise un certain nombre de cookies pour gérer, par exemple, les sessions utilisateurs.