CoreBOSBB
documents and utf8 - Printable Version

+- CoreBOSBB (https://discussions.corebos.org)
+-- Forum: Support (https://discussions.corebos.org/forumdisplay.php?fid=17)
+--- Forum: User Support (https://discussions.corebos.org/forumdisplay.php?fid=6)
+--- Thread: documents and utf8 (/showthread.php?tid=180)



documents and utf8 - opto - 09-07-2015

whereas web interface and UI work fine in utf8, we have problems with documents.

Their filenames come back from the system in utf8, which windows does not like.
So all filenames with special names look scrambled (= utf8 bytes are displayed as latin)..
Is there something one can do with it? (same in vt 530)

Klaus


RE: documents and utf8 - joebordes - 09-14-2015

Besides the optimal solution which is moving to a serious operating system like linux :-)  try this patch and let us know how it goes:



Code:
diff --git a/modules/uploads/downloadfile.php b/modules/uploads/downloadfile.php
index 31118ef..4d37f2d 100644
--- a/modules/uploads/downloadfile.php
+++ b/modules/uploads/downloadfile.php
@@ -34,7 +34,8 @@ if(!empty($deletecheck) && $adb->query_result($deletecheck, 0, 'deleted') == 1)
                header("Content-type: $fileType");
                header("Pragma: public");
                header("Cache-Control: private");
-               header("Content-Disposition: attachment; filename=\"$name\"");
+               $send_name = html_entity_decode($name, ENT_QUOTES, 'ISO-8859-15');
+               header("Content-Disposition: attachment; filename=\"$send_name\"");
                header("Content-Description: PHP Generated Data");
                echo $fileContent;
        } else {