Title: Plain text version „eats out“ Š
Last modified: August 21, 2016

---

# Plain text version „eats out“ Š

 *  Resolved [dainius.kaupaitis](https://wordpress.org/support/users/dainius-kaupaitis/)
 * (@dainius-kaupaitis)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/plain-text-version-eats-out-scaron/)
 * When email text is converted from HTML to plain-text such characters as š and
   Š are „eated out“. In HTML code they appear as entities `&scaron;` and `&Scaron;`
 * [https://wordpress.org/plugins/subscribe2/](https://wordpress.org/plugins/subscribe2/)

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

 *  [Matt Robinson](https://wordpress.org/support/users/mattyrob/)
 * (@mattyrob)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/plain-text-version-eats-out-scaron/#post-4650902)
 * [@dainius](https://wordpress.org/support/users/dainius/),
 * Having done a little reading about this it seems to be because š is not available
   in a plain text character set so it cannot be replaced.
 *  Thread Starter [dainius.kaupaitis](https://wordpress.org/support/users/dainius-kaupaitis/)
 * (@dainius-kaupaitis)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/plain-text-version-eats-out-scaron/#post-4650908)
 * Lithuanian (and some others) alphabet has such „abnormal“ characters: ąčęėįšųūž.
   Every character present in utf8. And only Š letter causes „problems“ in some 
   WYSIWYG editors – it is converted to HTML entity.
    I fixed this problem at you
   plugin code by adding line at `class-s2-core.php:252`: `$message = str_replace(
   array('&scaron;','&Scaron;'), array('š','Š'), $message);` But still not tested.
   I know, I will loose this on next plugin update. So it would be kind if you add
   this fix in your future update (maybe another – more „correct“ place in code).
   As I mentioned, this problem appears to many users, because this character is„
   popular“ not only in one language.
 *  Thread Starter [dainius.kaupaitis](https://wordpress.org/support/users/dainius-kaupaitis/)
 * (@dainius-kaupaitis)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/plain-text-version-eats-out-scaron/#post-4650910)
 * Also you delete a lot of potential characters by
    `$message = preg_replace('|&[
   ^a][^m][^p].{0,3};|', '', $message);` Why not to decode them back using `html_entity_decode()`?
   This could be safe, because here we talk about converting from HTML to plain-
   text mail.
 * I think instead of doing:
 *     ```
       $message = preg_replace('|&[^a][^m][^p].{0,3};|', '', $message);
       $message = preg_replace('|&|', '&', $message);
       ```
   
 * it would be better to do:
 *     ```
       $message = html_entity_decode( $message, ENT_NOQUOTES, 'UTF-8' );
       ```
   
 * BTW this also will fix `&Scaron;` problems 🙂
 *  [Matt Robinson](https://wordpress.org/support/users/mattyrob/)
 * (@mattyrob)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/plain-text-version-eats-out-scaron/#post-4650936)
 * [@dainius](https://wordpress.org/support/users/dainius/),
 * Those preg_replace() calls are pretty old code now and I think your approach 
   is simpler and better. I’ll get your change rolled into the next version.

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

The topic ‘Plain text version „eats out“ Š’ is closed to new replies.

 * ![](https://ps.w.org/subscribe2/assets/icon-256x256.png?rev=2318630)
 * [Subscribe2 - Form, Email Subscribers & Newsletters](https://wordpress.org/plugins/subscribe2/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/subscribe2/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/subscribe2/)
 * [Active Topics](https://wordpress.org/support/plugin/subscribe2/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/subscribe2/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/subscribe2/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Matt Robinson](https://wordpress.org/support/users/mattyrob/)
 * Last activity: [12 years, 3 months ago](https://wordpress.org/support/topic/plain-text-version-eats-out-scaron/#post-4650936)
 * Status: resolved