Support » Plugin: WP to Twitter » [Plugin: WP to Twitter] Truncating Greek Characters Fail

  • Resolved Staiko79


    It seems that WP to Twitter cannot truncate correctly a Greek #title# or Greek #body#. When I write in English, no problem. However, when I change to Greek and the title or body contains more than say 12 chars the truncation fails and all I get is the #url# through and maybe several characters of the title!

    For example: A Greek article with title “Το μήλο έπεσε κάτω από την μηλιά !”

    outputs (#url# #title#): Το μήιά !

    Why ????

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Joe Dolson


    That’s surprisingly short, but multibyte characters can cause problems. What version of PHP is your server running? Is it a version which includes the normalizer class, or do you have that class installed?

    WP to Twitter uses normalizer to check strings if it is available, but the results are mixed when it’s not available.

    Giving a look at the phpinfo of the server I can see that I am running

    PHP Version 5.3.3-7+squeeze14

    This means I am using the normalize class.

    Have been trying this brilliant WP to Twitter plugin many times and on many Greek sites of my clients (on same server) however all of them fail to truncate a Greek sentence 🙁

    Maybe Joe you can give it a try on your server maybe its a universal matter? Use this sentence “Το μήλο έπεσε κάτω από την μηλιά !”

    Thanks in advance !!

    Plugin Author Joe Dolson


    Thanks for following up – definitely sounds like a bug — I’ll do some testing and see what I can find! I know that I’ve tested this before (with Greek, specifically, even), but perhaps something new or unexpected has happened.

    Plugin Author Joe Dolson


    Interesting. Just tested, worked fine on my test server – tested in several ways; sentence by itself, #url# #title# combination, much longer tweet with text in the custom Twitter field, etc. — they all worked normally.

    That was a test using PHP 5.3.13…so I’m wondering what might be going on…obviously there’s a difference in PHP version, but I’m not aware of a difference between those versions impacting normalization. Granted, I don’t track the changes in PHP that closely…

    I’m wondering if there’s a database collation issue – is your database collation UTF-8? Is your WordPress installation set up as UTF-8?

    Hmmmm interesting, so its definitely a bug on my server ….. or site.

    As for all collation all set to UTF-8 database and wordpress wise…

    I sincerely thank you for your help, seems I have to find out about whats going on in my PHP 5.3.3-7 server and is effecting the Greek truncation (and the normalize class).

    Thanks again !

    Plugin Author Joe Dolson


    Let me know if you find anything – even if it’s a server issue, it may be possible for me to detect that particular setup and accommodate for it. Obviously, have to find it first…

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: WP to Twitter] Truncating Greek Characters Fail’ is closed to new replies.