Page 1 of 1

Swedish Character sets not showing

Posted: 07 Apr 2014, 00:08
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:

Re: Swedish Character sets not showing

Posted: 07 Apr 2014, 22:23
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!!

Re: Swedish Character sets not showing

Posted: 08 Apr 2014, 23:00
by Jan
Ok