Support » Plugin: Media Sync » Unicode/UTF problems

  • trotynn

    (@trotynn)


    This plugin works great, but I have had some problems with filenames containing non-ASCII characters, which have been converted to different characters, thus making the links (both in the media library and in pages and posts) point to the wrong location. At least these two are problematic:

    å (U+00E5) being converted to å (U+0061 and U+030A)
    ï (U+00EF) being converted to ï (U+0069 and U+0308)

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author erolsk8

    (@erolsk8)

    Wow, that’s so strange.

    Thank you for the great details! I’ll try to figure it out when I find some time.

    Thread Starter trotynn

    (@trotynn)

    I have found some more examples:
    Å (U+00C5) being converted to Å (U+0041 and U+030A)
    ö (U+00F6) being converted to ö (U+006F and U+0308)

    Thread Starter trotynn

    (@trotynn)

    Thanks for the quick reply! After looking more into it, I’m not entirely sure if it is Media Sync’s fault or just some other part of my WordPress installation. The links in my media library point to the wrong filenames (thus only grey boxes show up there), while the link directly from media sync (“Already in …”) actually shows me the correct filename and links to the file.

    Plugin Author erolsk8

    (@erolsk8)

    Have you tried uploading that same file through WP Media Library?

    Thread Starter trotynn

    (@trotynn)

    I am not sure how it was originally done when the site was created, but as of now I am having trouble uploading through the Media Library (probably due to some weird file permission issues), so I have resorted to uploading through FTP and syncing with Media Sync as a temporary solution.

    Plugin Author erolsk8

    (@erolsk8)

    I see, well, my guess is that you would have the same issue if you used Media Library, because this plugin uses those same functions for import.

    But until I’m able to find some time to look into this, I don’t really have a solution. Maybe to somehow rename all those files (and their database records) to strip all those special characters (e.g. ö -> o). Maybe just google “remove special characters from wordpress upload files”. Or I should make a plugin for that as well 😀

    I mean file titles can keep special characters, but I don’t think it makes sense to keep them in file names, it just causes weird issues.

    Thread Starter trotynn

    (@trotynn)

    As of now, I’m just renaming my picture links manually as a workaround. Thanks for the help anyway!

    Plugin Author erolsk8

    (@erolsk8)

    Hey @trotynn, it’s been ages, but I finally got to test this again. So if you’re still interested, you can check out if these comments I just made would be helpful:

    * https://wordpress.org/support/topic/filenames-with-diacritics-not-recognized/#post-14756533
    * https://wordpress.org/support/topic/filenames-with-diacritics-not-recognized/#post-14757060

    I also tried adding your special characters (å and ï) and it also worked.

    Basically, collation of these database tables: wp_posts and wp_postmeta need to support characters that exist in file name.

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.