Title: Encoding error, ruins everything!
Last modified: August 21, 2016

---

# Encoding error, ruins everything!

 *  Resolved [2unco](https://wordpress.org/support/users/2unco/)
 * (@2unco)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/encoding-error-ruins-everything/)
 * One of my clients created a twitter post with some wacky characters. Frankly,
   I don’t know which characters they were – they simply displayed as rectangles.
 * As soon as someone viewed the website, causing your plugin to run the update 
   the options stored in the database (and hence the text from each recent tweet),
   all hell broke loose.
 * Due to the non-UTF-8 nature of those characters, the MySQL server didn’t accept
   the remainder of the option string. This, obviously, caused a fatal error on 
   the first chance it could when your plugin would try to retrieve information 
   from it.
 * I did my own makeshift solution as I was using this plugin for a MAJOR component
   of a MAJOR client’s site (thanks for that by the way), and it was breaking the
   layout badly. All I did was utf8_encode($tweets[$i][‘text’]) for all $i in count(
   $tweets) before you added them to the $options array for updating.
 * Look into it, it’s a pretty big issue. Looking forward to your next update having
   it – I hate having to hack solutions. Thanks!
 * [http://wordpress.org/extend/plugins/twitget/](http://wordpress.org/extend/plugins/twitget/)

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

 *  Anonymous User 9905372
 * (@anonymized-9905372)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/encoding-error-ruins-everything/#post-3940459)
 * First of all thanks, this one has been eluding me for a while. Could you post
   the updated code on Pastebin or a similar service? I’ll commit the changes as
   soon as I get back from my vacation.
 * Cheers.
 *  Thread Starter [2unco](https://wordpress.org/support/users/2unco/)
 * (@2unco)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/encoding-error-ruins-everything/#post-3940642)
 * Glad I could help, [http://pastebin.com/PieZyXf3](http://pastebin.com/PieZyXf3)
   😀
    You can find the changes on lines 255 and 292. Note that they’re the encoding
   part. I didn’t have time to properly decode it or test it, it just stopped array
   serialization errors from occuring.
 * Enjoy your vacation!
 *  Anonymous User 9905372
 * (@anonymized-9905372)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/encoding-error-ruins-everything/#post-3940746)
 * I’ve made the changes and will commit it soon.
 * Cheers and thanks again.
 *  Anonymous User 9905372
 * (@anonymized-9905372)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/encoding-error-ruins-everything/#post-3940747)
 * Hey 2unco,
 * Could you paste some of these “funky” characters, I’ve devised a somewhat different
   solution and would like to test it.
 * Thank you.
 * Cheers.
 *  Thread Starter [2unco](https://wordpress.org/support/users/2unco/)
 * (@2unco)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/encoding-error-ruins-everything/#post-3940748)
 * Uhmm… I dunno if this helps, but:
 * 🐊🔥🔥🔥
 * That’s all I could see – even on Twitter. Thanks for looking into it further 
   🙂
 *  Anonymous User 9905372
 * (@anonymized-9905372)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/encoding-error-ruins-everything/#post-3940749)
 * I’ve currently tested it with the following:
 * 漢字 かんじ 火 屵 苗 艹 σ τ υ φ χ ψ ω 🐊🔥🔥🔥
 * And they show fine in the corrected version. I count these as “funky” 🙂
 * I’ll commit ASAP.
 * Cheers.
 *  Thread Starter [2unco](https://wordpress.org/support/users/2unco/)
 * (@2unco)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/encoding-error-ruins-everything/#post-3940750)
 * Legen – wait for it…
 * Fire? Oh they’re not squares! They actually look like things on my phone. Those
   crazy clients…
 * dary!
 * Thanks a bunch 😀

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

The topic ‘Encoding error, ruins everything!’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/twitget.svg)
 * [Twitget](https://wordpress.org/plugins/twitget/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/twitget/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/twitget/)
 * [Active Topics](https://wordpress.org/support/plugin/twitget/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/twitget/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/twitget/reviews/)

## Tags

 * [database](https://wordpress.org/support/topic-tag/database/)
 * [encoding](https://wordpress.org/support/topic-tag/encoding/)
 * [fatal error](https://wordpress.org/support/topic-tag/fatal-error/)
 * [utf8](https://wordpress.org/support/topic-tag/utf8/)

 * 7 replies
 * 2 participants
 * Last reply from: [2unco](https://wordpress.org/support/users/2unco/)
 * Last activity: [12 years, 10 months ago](https://wordpress.org/support/topic/encoding-error-ruins-everything/#post-3940750)
 * Status: resolved