• Resolved IsSeN

    (@issen)


    Hi Thom

    I have a few filenames that include characters such as “é”. It is displayed as “é”. In a folder name the accents are displayed fine.

    In my File away shortcode i’ve put unicode=”true”.
    In my template I have <meta charset=”utf-8″>

    Any idea’s on how to fix this?

    https://ww.wp.xz.cn/plugins/file-away/

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author thomstark

    (@thomstark)

    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.

    Plugin Author thomstark

    (@thomstark)

    actually, just delete this line altogher and replace it with nothing:

    $rawname = utf8_encode($rawname);

    Plugin Author thomstark

    (@thomstark)

    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?

    Plugin Author thomstark

    (@thomstark)

    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/

    Plugin Author thomstark

    (@thomstark)

    Did you make both changes?

    Plugin Author thomstark

    (@thomstark)

    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 🙂

    Plugin Author thomstark

    (@thomstark)

    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.

    Plugin Author thomstark

    (@thomstark)

    I appreciate it! Dealing with unicode characters and php is quite frustrating, but I’m determined to get this resolved.

    Plugin Author thomstark

    (@thomstark)

    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.

    Plugin Author thomstark

    (@thomstark)

    Resolved in 3.0. 🙂

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘Special Characters’ is closed to new replies.