Articles of encoding

Text cut off on save

I am using WP 3.4. My problem occurs when I attempt to copy and paste anything into the post or page editor of WordPress. The situation arises every time I save or attempt to preview the post. The post gets truncated and about 65% of the text gets chopped off the end of the post. […]

Faulty restore of the database, encoding issue

I messed up the settings with W3 Total Cache (tried to import all the media to my library, didn’t work out well, broke all my links to every picture). So I took my latest backup of the database, copy/paste the _post and _postmeta tables inside my phpmyadmin. It brought back the links and pictures as […]

WordPress problem with htmlentities

I make some changes over the post before storing it in the database. I use content_save_pre to do this. Some characters like ” get done into “ in the JavaSript code which I insert (part of the change). How do I prevent that from happening?

Unexpected = (equal sign) characters in wp mail

I have created a custom form for user registration and a custom html email when someone registers. $headers = ‘From: test<ttest@test.org>’ . “\r\n”; $subject = ‘Test Subj’; $msg=”; $msg .= ‘ATTN: ‘.$fname.'<br><br>’; $msg .= ‘<strong>*Please confirm receipt of this message. If you are not the intended recipient, please notify us immediately.*</strong><br><br>’; $msg .= ‘The * […]

Site Rss not seen by browser

We have a site http://ort.org.il built with WP 3.1.2. Its RSS address should be http://ort.org.il/feed/, but nothing shows up there. I can see the feed in the View Source, but not in the browser, and not in one of our other applications, that reads the RSS from this site. What could be the problem, and […]

Text cut off after the character 𪇆 in TinyMCE

I use the latest version of wordpress (v3.9.2, Taiwan Chinese Traditional), and found it can not display this Chinese word 𪇆, but other Chinese words can be displayed normally. I just use this word on a post, and all the content after it is lost (became blank, this word disappeared too), after I saved the […]

add_rewrite_rule not working for language specific characters

My default search query: example.com/search/?search_text=keyword What I want to transform it: example.com/search/keyword So I added this to my function.php add_rewrite_rule(‘^search/([^/]*)?’,’index.php?pagename=search&search_text=$matches[1]’,’top’); Works fine for english alphabet but whenever I search a keyword in my language like this: example.com/search/kırmızı The title of the page becomes: k%C4%B1rm%C4%B1z%C4%B1 and no results returned. Let me know if you need more […]

How to set charset for wp_remote_post request?

I’m using wp_remote_post() on a project and it works great. But seems like the server on which I need to make the POST request is a Windows (ISS) server. So the third-party service that provides this specific endpoint requires that all POST requests has a Windows-1252 character encoding, otherwise there will be issues with special […]

WordPress Database Charset/Collate

Is there an easy way of getting the charset and collation of the DB tables in WordPress without resorting to SQL queries?

How to increase the character limit for post name of 200?

I have post name in Thai which uses UTF-8 character. Many of them encode into super long in ASCII e.g. วิธีการหลีกเลี่ยงข้อผิดพลาดทั้ง-8-ในชีวิตการแต่งงาน I’ve changed the type of “post_name” using phpMyAdmin to VARCHAR(1000) and collation to utf8_unicode_ci. However, in my WordPress backend editor, the above post name is still automatically cut to วิธีการหลีกเลี่ยงข้อผิ when I try to […]