Title: Different encoding for double quotes
Last modified: February 7, 2020

---

# Different encoding for double quotes

 *  Resolved [arturs4](https://wordpress.org/support/users/arturs4/)
 * (@arturs4)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/different-encoding-for-double-quotes/)
 * Hello!
 * I’ve noticed that there are 2 different encodings for double quotes. Please, 
   see screenshot: [https://i.ibb.co/tsRyHYW/woo-07-02-2020.jpg](https://i.ibb.co/tsRyHYW/woo-07-02-2020.jpg)
 * 1st type is in product page, category page, breadcrumb.
    2nd type is in cart 
   sidebar widget, cart, checkout. This type is also in product edit page, where
   I write product title.
 * Why are they different? It makes a problem with my translation plugin.
 * Regards,
    Arturs

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

 *  Plugin Support [Riaan K.](https://wordpress.org/support/users/riaanknoetze/)
 * (@riaanknoetze)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/different-encoding-for-double-quotes/#post-12414444)
 * Hi Arturs,
 * Have you checked the underlying HTML code on whether they’re actually different?
   The reason I’m asking is that the differences could also be the result of font
   being used in those areas rather than the actual quotes.
 * If you can share a direct URL to that page, we’ll also be able to verify it from
   our side 🙂
 * Thanks!
 *  Thread Starter [arturs4](https://wordpress.org/support/users/arturs4/)
 * (@arturs4)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/different-encoding-for-double-quotes/#post-12414462)
 * Hello!
 * They ARE different, and because of that my translation plugin thinks that those
   are 2 different strings, so I have to translate all my titles twice.
 * I also tried to change font, but that didn’t help – those quotes are different.
 * Can you, please, help me fix this?
 *  Thread Starter [arturs4](https://wordpress.org/support/users/arturs4/)
 * (@arturs4)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/different-encoding-for-double-quotes/#post-12414466)
 * I can give you url in private content, but I don’t see here such option.
 *  Plugin Support [Riaan K.](https://wordpress.org/support/users/riaanknoetze/)
 * (@riaanknoetze)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/different-encoding-for-double-quotes/#post-12414519)
 * Good to hear from you again 🙂
 * At the moment, the forum support platform in WordPress.org does not allow for
   private details to be shared. In the event that the URL definitely not be shared
   in public, the next step would be to get in touch with a web developer with whom
   sensitive information can be shared separately to take a closer look
 *  Thread Starter [arturs4](https://wordpress.org/support/users/arturs4/)
 * (@arturs4)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/different-encoding-for-double-quotes/#post-12414545)
 * You can check that on your own site: [https://themes.woocommerce.com/storefront/product/professional-chefs-kitchen-knife/](https://themes.woocommerce.com/storefront/product/professional-chefs-kitchen-knife/)
 * Add this product to cart, open cart widget, and there it is – 2 types of apostrophe.
 * Can you, please, fix this?
 *  Thread Starter [arturs4](https://wordpress.org/support/users/arturs4/)
 * (@arturs4)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/different-encoding-for-double-quotes/#post-12439627)
 * Can I get a reply, please?
 *  [wbrubaker.a11n](https://wordpress.org/support/users/wbrubaker/)
 * (@wbrubaker)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/different-encoding-for-double-quotes/#post-12471214)
 * Howdy Arturs,
 * > Why are they different?
 * They are different because when the product title is output (and the same is 
   true for the breadcrumbs) the WordPress function named `the_title` is called 
   which then further processes the title through a function named `wptexturize`.
   The documentation on that function can be found here: [https://developer.wordpress.org/reference/functions/wptexturize/](https://developer.wordpress.org/reference/functions/wptexturize/)
 * WooCommerce does provide some dynamically named filters that could be leveraged
   to force the product title to use typographer’s quotes when it is output in the
   cart/mini-cart/checkout page etc.
 * Here’s the filter that I would suggest using: [https://github.com/woocommerce/woocommerce/blob/3.9.2/includes/abstracts/abstract-wc-data.php#L751](https://github.com/woocommerce/woocommerce/blob/3.9.2/includes/abstracts/abstract-wc-data.php#L751)
 * The hook prefix part of that filter name, in this case, would be `woocommerce_product_get_`
   and since the property that we want to filter is `name` the full filter name 
   would be `woocommerce_product_get_name` and it would pass the raw database value
   for the product title through the filter so one could hook into that filter with
   a callback function to run `wptexturize` against the value. Putting all of that
   together might look something like:
 * `add_filter( 'woocommerce_product_get_name', 'wptexturize' );`
 * It’s usually recommended that these types of snippets be placed in your theme’s
   functions.php file, but I personally don’t think that’s a good idea since depending
   on how the theme update works you may lose these custom changes when updating
   your theme. Some people use the [Functionality]([https://wordpress.org/plugins/functionality/](https://wordpress.org/plugins/functionality/))
   plugin or something similar for this purpose.
    -  This reply was modified 6 years, 2 months ago by [wbrubaker.a11n](https://wordpress.org/support/users/wbrubaker/).
 *  Thread Starter [arturs4](https://wordpress.org/support/users/arturs4/)
 * (@arturs4)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/different-encoding-for-double-quotes/#post-12472220)
 * Hello!
 * Yes, yes, yes, now all the quotes are in the same style, which is just what I
   wanted.
 * Thank you very, very much!

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

The topic ‘Different encoding for double quotes’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

 * 8 replies
 * 3 participants
 * Last reply from: [arturs4](https://wordpress.org/support/users/arturs4/)
 * Last activity: [6 years, 2 months ago](https://wordpress.org/support/topic/different-encoding-for-double-quotes/#post-12472220)
 * Status: resolved