Swedish Character sets not showing

Phoca Download - download manager
MrSolvens
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 07 Apr 2014, 00:02

Swedish Character sets not showing

Post by MrSolvens »

Hello and thank you for this fantastic component.
I have an issue where my Swedish characters e.g Å, å, Ä, ä, Ö, ö is not showing for reasons I do not know. I uploaded some files (PDF and Doc) with the names: Verksamhetsberättelse.doc/pdf but when I want to download it , it just reads Verksamhetsberttels...? No "ä". I have tried with the other characters but came up wanting. Waz up? :shock:
MrSolvens
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 07 Apr 2014, 00:02

Re: Swedish Character sets not showing

Post by MrSolvens »

Solved. On line 60 in X:\wamp\wamp\yoursite\libraries\joomla\filesystem\file.php The regex do not follow through to Swe character sets.
Example:
public static function makeSafe($file)
{
// Remove any trailing dots, as those aren't ever valid file names.
$file = rtrim($file, '.');
$regex = array('#(\.){2,}#', '#[^A-Za-z0-9\.\_\- ]#', '#^\.#');
$regex = array('#(\.){2,}#', '#[^A-Öa-ö0-9\.\_\- ]#', '#^\.#');

return trim(preg_replace($regex, '', $file));
}

Solved then!!
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Swedish Character sets not showing

Post by Jan »

Ok
If you find Phoca extensions useful, please support the project
Post Reply