Title: Fatal Error &#8211; utf8_encode()
Last modified: December 8, 2017

---

# Fatal Error – utf8_encode()

 *  [mistmath](https://wordpress.org/support/users/mistmath/)
 * (@mistmath)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/fatal-error-utf8_encode/)
 * Hello,
 * I’ve searched on the forum but haven’t been able to solve it by myself 🙁
 * I’ve installed the plugin and then I have this ugly fatal error :
 * > Fatal error: Uncaught Error: Call to undefined function utf8_encode() in /var/
   > www/html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/
   > compatibility/mb-string-compatibility.php:17 Stack trace: #0 /var/www/html/
   > wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/
   > src/Dompdf.php(428): mb_convert_encoding(‘<!DOCTYPE html>…’, ‘UTF-8’, ‘iso-
   > 8859-1’) #1 /var/www/html/wp-content/plugins/woocommerce-pdf-invoices-packing-
   > slips/includes/class-wcpdf-pdf-maker.php(50): Dompdf\Dompdf->loadHtml(‘<!DOCTYPE
   > html>…’) #2 /var/www/html/wp-content/plugins/woocommerce-pdf-invoices-packing-
   > slips/includes/documents/abstract-wcpdf-order-document.php(499): WPO\WC\PDF_Invoices\
   > PDF_Maker->output() #3 /var/www/html/wp-content/plugins/woocommerce-pdf-invoices-
   > packing-slips/includes/documents/abstract-wcpdf-order-document.php(530): WPO\
   > WC\PDF_Invoices\Documents\Order_Document->get_pdf() #4 /var/www/html/wp-content/
   > plugins/woocommerce-pdf-invoices-packing-slips/includes/class-wcpdf-main.php(
   > 218): WPO\WC\ in /var/www/html/wp-content/plugins/woocommerce-pdf-invoices-
   > packing-slips/includes/compatibility/mb-string-compatibility.php on line 17
 * I’ve been reading around and I suspect a php7 issue… but I’m not a guru.
    Can
   you help me ?
 * Thank you !

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

 *  Plugin Contributor [Ewout](https://wordpress.org/support/users/pomegranate/)
 * (@pomegranate)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/fatal-error-utf8_encode/#post-9770095)
 * Hi! Is this a custom PHP7 setup? The plugin is fully PHP7 compatible and on a
   normal installation, utf8_encode is a standard function in PHP.
    Either way, 
   this is already a ‘fallback’ method, it looks like you don’t have the required
   PHP MBString extension – you may want to check if there’s other things missing.
   Under WooCommerce > PDF Invoices > Status you can find more information about
   this.
 * If you ask you host to enable MBString they should be able to do that for you,
   it’s a pretty standard extension.
 * Ewout
 *  Thread Starter [mistmath](https://wordpress.org/support/users/mistmath/)
 * (@mistmath)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/fatal-error-utf8_encode/#post-9770132)
 * Hi,
 * No this is a standard php7 setup… strange. I’ll dig that point.
    Thank you.
 * Mathieu

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

The topic ‘Fatal Error – utf8_encode()’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-pdf-invoices-packing-slips/assets/icon-256x256.
   png?rev=2189942)
 * [PDF Invoices & Packing Slips for WooCommerce](https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/reviews/)

## Tags

 * [mbstring](https://wordpress.org/support/topic-tag/mbstring/)
 * [PHP7](https://wordpress.org/support/topic-tag/php7/)

 * 2 replies
 * 2 participants
 * Last reply from: [mistmath](https://wordpress.org/support/users/mistmath/)
 * Last activity: [8 years, 5 months ago](https://wordpress.org/support/topic/fatal-error-utf8_encode/#post-9770132)
 * Status: not resolved