Somebody else JUST posted about this. It’s because I recently started utf8_encode()ing the filenames, and I guess filenames that are already utf8 encoded are now getting double encoded.
PHP is such a mess with utf8; it does not support it, and they abandoned plans to start supporting it. I will be working on this problem. In the meantime if you go to wp-content/plugins/file-away/lib/cls/class.fileaway.php and do a search for this:
$rawname = utf8_encode($rawname);
and then change it to this:
$rawname = $rawname;
you should be ok. I will try to have a solution by next release.
actually, just delete this line altogher and replace it with nothing:
$rawname = utf8_encode($rawname);
By the way, I have <meta charset="utf-8"> in my template header as well, but that doesn’t actually automatically encode output in utf-8.
It depends on what you use to name the file, I guess. If I do ALT+0233 to output é, it will not be encoded as utf-8 unless if do utf8_encode(é). I’ll just have to do some investigation. Can you email a couple of example files that are showing up wrong in your table?
You might also have to change this:
fileaway_utility::unicode(utf8_encode($link))
to this:
fileaway_utility::unicode($link)
in the same document, just a few lines down from the other line discussed.
Thread Starter
IsSeN
(@issen)
Everything displays fine, however it seems the download link is no longer correct.
http://taalmagazines.pelckmans.be/panache/panache-1/leerkracht/
Did you make both changes?
Did you change this:
fileaway_utility::unicode(utf8_encode($link))
to this:
fileaway_utility::unicode($link)
?
Thread Starter
IsSeN
(@issen)
Yes I have, this doesn’t seem to solve it. For now I deleted the special characters in the filenames.
I encouter the problem with filenames containing “é” and “à”.
I also found that filenames or foldernames containing a ‘ give problems. Nothing happens when you click it.
I often want to use french filenames. They contain a lot of special characters 🙂
Can I take another look at your site? If so, can you put some files back with those characters in them?
Thread Starter
IsSeN
(@issen)
Hi Thom
I will put this live version on the development environment for you to test with. This might take some time. I’ll get in touch by e-mail.
I appreciate it! Dealing with unicode characters and php is quite frustrating, but I’m determined to get this resolved.
BTW I’m making very good progress on the lightbox feature. I coded the lightbox functionality from scratch. Now I just have to design different styles.