Title: MaTachi's Replies | WordPress.org

---

# MaTachi

  [  ](https://wordpress.org/support/users/matachi/)

 *   [Profile](https://wordpress.org/support/users/matachi/)
 *   [Topics Started](https://wordpress.org/support/users/matachi/topics/)
 *   [Replies Created](https://wordpress.org/support/users/matachi/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/matachi/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/matachi/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/matachi/engagements/)
 *   [Favorites](https://wordpress.org/support/users/matachi/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Disqus Comment System] Not work v2.80](https://wordpress.org/support/topic/not-work-v280/)
 *  [MaTachi](https://wordpress.org/support/users/matachi/)
 * (@matachi)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/not-work-v280/page/2/#post-5435269)
 * Thank you Frank, that did indeed solve the problem.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Disqus Comment System] Not work v2.80](https://wordpress.org/support/topic/not-work-v280/)
 *  [MaTachi](https://wordpress.org/support/users/matachi/)
 * (@matachi)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/not-work-v280/page/2/#post-5435266)
 * I’m having the same problem with Autoptimize enabled.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[My YouTube Channel] No items [Check here why]](https://wordpress.org/support/topic/no-items-check-here-why/)
 *  [MaTachi](https://wordpress.org/support/users/matachi/)
 * (@matachi)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/no-items-check-here-why/page/2/#post-5019183)
 * I changed the collation with:
 * `alter table wp_options convert to character set utf8 collate utf8_unicode_ci;`
 * To show the collation for all database table columns:
 * `SELECT TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME, COLLATION_NAME 
   FROM INFORMATION_SCHEMA.COLUMNS;`
 * However, that didn’t help. Still isn’t possible to store a string containing 
   the emoticon…
 * I guess base64 encoding the string is a sufficient workaround. :/
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[My YouTube Channel] No items [Check here why]](https://wordpress.org/support/topic/no-items-check-here-why/)
 *  [MaTachi](https://wordpress.org/support/users/matachi/)
 * (@matachi)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/no-items-check-here-why/page/2/#post-5019182)
 * OK, when the value contains the 🐎 character it never gets saved, as seen in:
 *     ```
       mysql> select * from wp_options where option_name like '%kalle%';
       +-----------+------------------+--------------+----------+
       | option_id | option_name      | option_value | autoload |
       +-----------+------------------+--------------+----------+
       |       270 | _transient_kalle |              | yes      |
       +-----------+------------------+--------------+----------+
       1 row in set (0.00 sec)
       ```
   
 * But if I remove 🐎 and only keeps the string `hej`:
 *     ```
       mysql> select * from wp_options where option_name like '%kalle%';
       +-----------+------------------+--------------+----------+
       | option_id | option_name      | option_value | autoload |
       +-----------+------------------+--------------+----------+
       |       270 | _transient_kalle | hej          | yes      |
       +-----------+------------------+--------------+----------+
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[My YouTube Channel] No items [Check here why]](https://wordpress.org/support/topic/no-items-check-here-why/)
 *  [MaTachi](https://wordpress.org/support/users/matachi/)
 * (@matachi)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/no-items-check-here-why/page/2/#post-5019181)
 * Umm, played a little more with it. Seems like the string with the Unicode character
   only shows up after the first page load. When you do additional page reloads 
   it doesn’t appear again. However, if I remove 🐎 and only keep `hej` it works
   fine on every page load. Dunno what’s up with that behaviour. Maybe the first
   time it never gets it from the actual database.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[My YouTube Channel] No items [Check here why]](https://wordpress.org/support/topic/no-items-check-here-why/)
 *  [MaTachi](https://wordpress.org/support/users/matachi/)
 * (@matachi)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/no-items-check-here-why/page/2/#post-5019180)
 * Haven’t tried the collation change, I’m affraid I will mess something up, especially
   on a live website. 😛
 * But I have a locally installed instance of WordPress, which also has collation
   set to `utf8_general_ci`. I added the following three lines of code to the default
   plugin `hellp.php`:
 *     ```
       set_transient('kalle', '🐎hej');
       $hej = get_transient('kalle');
       echo $hej;
       ```
   
 * And it prints the string `🐎hej` correctly on the screen. So apparently there
   shouldn’t be any problems with storing and getting those exotic Unicode characters.
 * However, my local web server runs another version of PHP, etc. Dunno if that 
   matters.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[My YouTube Channel] No items [Check here why]](https://wordpress.org/support/topic/no-items-check-here-why/)
 *  [MaTachi](https://wordpress.org/support/users/matachi/)
 * (@matachi)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/no-items-check-here-why/#post-5019178)
 * I tried the code change that you suggested, with base64 encoding the transient
   data, and it worked fine. However, it feels a bit like a hack. The downsides 
   are the extra encoding/decoding and 33 % storage overhead. Although, I guess 
   neither is noticable.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[My YouTube Channel] No items [Check here why]](https://wordpress.org/support/topic/no-items-check-here-why/)
 *  [MaTachi](https://wordpress.org/support/users/matachi/)
 * (@matachi)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/no-items-check-here-why/#post-5019177)
 * I haven’t coded any WordPress plugins so I don’t know the API. But I’m wondering,
   why do you currently do `set_transient($cache_key, json_decode($json), $instance['
   cache_time']);`? Isn’t it possible to store a JSON string as is in the database?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[My YouTube Channel] No items [Check here why]](https://wordpress.org/support/topic/no-items-check-here-why/)
 *  [MaTachi](https://wordpress.org/support/users/matachi/)
 * (@matachi)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/no-items-check-here-why/#post-5019176)
 * I looked at my MySQL database and the collation for the varchar columns in `wp_options`
   are all set to `utf8_general_ci`. I wonder if it might work if I were to change
   the collation to `utf8_unicode_ci` instead. Apparently does the latter handle
   Unicode characters better, although a little slower; according to [http://stackoverflow.com/questions/1036454/what-are-the-diffrences-between-utf8-general-ci-and-utf8-unicode-ci](http://stackoverflow.com/questions/1036454/what-are-the-diffrences-between-utf8-general-ci-and-utf8-unicode-ci).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[My YouTube Channel] No items [Check here why]](https://wordpress.org/support/topic/no-items-check-here-why/)
 *  [MaTachi](https://wordpress.org/support/users/matachi/)
 * (@matachi)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/no-items-check-here-why/#post-5019174)
 * I looked at your patch:
 * `$json = preg_replace('/🐎/','',$json);`
 * However, that does obviously only handle the Unicode character 🐎, i.e. U+1F40E.
   In the Unicode standard there are a lot more emoticons: [https://en.wikipedia.org/wiki/Emoji#In_the_Unicode_standard](https://en.wikipedia.org/wiki/Emoji#In_the_Unicode_standard)
   And I guess there would be problems with other Unicode characters as well: [https://en.wikipedia.org/wiki/List_of_Unicode_characters](https://en.wikipedia.org/wiki/List_of_Unicode_characters)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[My YouTube Channel] No items [Check here why]](https://wordpress.org/support/topic/no-items-check-here-why/)
 *  [MaTachi](https://wordpress.org/support/users/matachi/)
 * (@matachi)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/no-items-check-here-why/#post-5019172)
 * Is the problem in `set_transient` or in `json_decode`? I mean, I would think 
   it’s desirable if they can handle all unicode characters properly.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[My YouTube Channel] No items [Check here why]](https://wordpress.org/support/topic/no-items-check-here-why/)
 *  [MaTachi](https://wordpress.org/support/users/matachi/)
 * (@matachi)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/no-items-check-here-why/#post-5019170)
 * I set the timeout variable to 10 on both places in youtube-channel.php, but I’m
   still getting the same error.
 * It’s a little hard to follow the flow in the code because you have mixed both
   tabs and spaces for indentation, and WordPress’s editor shows tabs as 8 spaces
   wide.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[My YouTube Channel] No items [Check here why]](https://wordpress.org/support/topic/no-items-check-here-why/)
 *  [MaTachi](https://wordpress.org/support/users/matachi/)
 * (@matachi)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/no-items-check-here-why/#post-5019168)
 * I’m experiencing the same problem. I don’t have any cache plugins activated on
   my WordPress blog.
 * This is my debug information from the plugin:
 *     ```
       server: Apache
       php: 5.4.8
       wp: 3.9.1
       ytc: 2.2.0
       url: http://misslisibell.se
       title: Mina senaste YouTube-filmer
       channel: MissLisibell
       vidqty: 5
       playlist: null
       use_res: null
       cache_time: 3600
       only_pl: null
       getrnd: null
       maxrnd: 5
       goto_txt: null
       showgoto: null
       popup_goto: null
       showtitle: on
       showvidesc: null
       descappend: …
       videsclen: null
       width: 220
       height: null
       to_show: thumbnail
       autoplay: null
       controls: null
       fixnoitem: null
       ratio: 3
       fixyt: null
       hideinfo: null
       hideanno: null
       themelight: null
       debugon: on
       userchan: null
       enhprivacy: null
       autoplay_mute: null
       ```
   
 * However, the thumbnails show up as expected if I change the “Cache feed” setting
   to “Do not cache”. On the other hand, I suspect disabling the caching will affect
   the page load time and server performance negatively.

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