JSmallfib php 5.4 and special characters

This forum is for general questions about extensions for Joomla! 2.5.

Moderators: pe7er, General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
perbrix
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Sun Apr 29, 2012 8:30 pm

JSmallfib php 5.4 and special characters

Post by perbrix » Sat Jan 25, 2014 12:38 pm

After my web hotel - Surftown - has upgraded to php 5.4.1, I have problems with the JSmallfib extension and the Danish special characters like æ, ø and å in the filenames. Any suggestions how to solve this issue?

rbrekken
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Thu Jan 29, 2015 7:05 am

Re: JSmallfib php 5.4 and special characters

Post by rbrekken » Thu Jan 29, 2015 7:12 am

I have the same problem with the same (Norwegian) characters. File names or folder containing these characters are blank/empty, just the icon is visible and the link is unusable. Great extension, use it a lot, but without those characters it becomes unusable.

perbrix
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Sun Apr 29, 2012 8:30 pm

Re: JSmallfib php 5.4 and special characters

Post by perbrix » Thu Jan 29, 2015 9:19 am

We have the problem because htmlspecialchars has changed it's default 3. value in PHP 5.4 from ISO-8859-1 to UTF-8. You can see more details in the PHP maual.

My work around has been to modify the JSmallfib.php file. You have to make modicification in 2 (two) sections.

In section // Reading the data of files and directories
Delete or deactivate:
//$dirs[] = htmlspecialchars($it);
Insert this line:
$dirs[] = htmlspecialchars($it, ENT_COMPAT | ENT_HTML401 , 'ISO-8859-1' );

In section // file list filtering
also make above changes

rbrekken
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Thu Jan 29, 2015 7:05 am

Re: JSmallfib php 5.4 and special characters

Post by rbrekken » Thu Jan 29, 2015 9:44 am

Thanx, worked like a charm... :-)

Invader-CH
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Tue Jul 14, 2015 8:09 am

Re: JSmallfib php 5.4 and special characters

Post by Invader-CH » Tue Jul 14, 2015 8:16 am

Very useful.
Using this work around I'm now able to upload Files or create Folders using German Umlauts
But I'm not able to delete Files or Folders with German Umlauts.
Any idea? I would be very grateful...


Locked

Return to “Extensions for Joomla! 2.5”