You are here:  » special characters (ä-ü-ö)


special characters (ä-ü-ö)

Submitted by alecs on Sun, 2011-09-11 08:07 in

hi david,

products/categorys with special characters ä, ü, ö in it, are not displaying / empty.

thanks
alecs

Submitted by support on Sun, 2011-09-11 08:36

Thanks, Alecs,

I'm travelling today but i'll investigate first thing tomorrow and post back...

Cheers,
David.

Submitted by brentmitchell on Tue, 2011-09-13 19:56

Hey David,

I tried thinking maybe a search and replace would work, but no luck. I'm having the same issue with †being used in place of ".

Submitted by support on Tue, 2011-09-13 20:14

Hi Brent,

Something like †being displayed in place of an expected character is more indicative of a character encoding mis-match between the Price Tapestry installation and the WordPress installation - i'll be considering this at the same time as looking at the above...

Thanks,
David.

Submitted by alecs on Sat, 2011-10-08 07:59

hi again,

sorry but without a fix for the "specials" its not possible for me to go on. filters dont work and category`s & details are blank if there is ä-ü-ö in the product title.

cheers
alecs

Submitted by support on Sat, 2011-10-08 12:54

Hello Alecs,

Check your wp-config.php, at line 42 you should find:

define('DB_CHARSET', 'utf8');

I was working this problem with another user and the special characters display properly after changing the above line t:

define('DB_CHARSET', 'utf-8');

Hope this helps!

If not, if you could please email me a link to a page showing the characters not being displayed correctly I'll take a look right away for you..

Cheers,
David

Submitted by Gael on Sun, 2011-10-09 15:13

Hi,

This fixed most of my characters encoding problems too, but I still have a problem for the meta description and keywords: é displays é (code:é) on the metas.
Another thing which may be related: when I enter a special character in wp-admin > Settings > PriceTapestry.org and save, the character displays fine on the product page. But if change another thing and save again, the character will be encoded twice, and then will display é on the product page.

Thanks for the help!
Gael

Submitted by kempo on Mon, 2011-10-10 17:17

Hi David,
I am having the same problem. Changing the line "utf8" to "utf-8" just solved the displaying the merchant names and product names properly. But when I click to a product name which has special character it returns an empty page. I think the Product URL causes the problem. In my case for example I have a product named
"Ace Pet Disk Şeklinde Hamster ve Tavşan Kemirme Tahtası 10 cm"
and the product URL on the address bar is:
http://mydomain/product/Ace-Pet-Disk-Şeklinde-Hamster-ve-Tavşan-Kemirme-Tahtası-10-cm.html/
so the result is empty page. Is that the reason for empty pages?
Cheers,
Kempo

Submitted by support on Mon, 2011-10-10 17:25

Hi Kempo,

I'm aware of the special characters problem, please could you try the following; in your pto_common.php look for the following code at line 31:

  return get_bloginfo('url').$pto_config_productBaseHREF.pto_common_hyphenate($product->normalised_name).".html";

...and REPLACE with:

  return get_bloginfo('url').$pto_config_productBaseHREF.urlencode(pto_common_hyphenate($product->normalised_name)).".html";

Thanks,
David.

Submitted by kempo on Tue, 2011-10-11 09:09

Hi David,
I tried it and the results are the same. Nothing has been changed...
Thanks,
kempo.

Submitted by support on Tue, 2011-10-11 14:16

Hi Kempo,

Please could you email me a link to the installation and also let me know the URL of the corresponding Price Tapestry installation and I'll check it out..

Thanks!
David.

Submitted by kempo on Sat, 2011-10-15 20:31

Hi David,
Thanks for your great support that solved my problem. But now I'am struggling with the Merchant Logos. I have set a logo for a Merhant named "ARÇELİK BAYİM" and it shows properly under the pt installation but the image does not show up in wordpress installation. I think the problem is again special characters.
Thanks!
kempo.

Submitted by support on Sun, 2011-10-16 08:12

Hi Kempo,

I checked the source of the page not showing the logo and it looks like the external Base HREF is incorrect - I recall from your email that your Price Tapestry installation is at pto.yourdomain.com but it looks it's currently ponting to www.yourdomain.com - that should be all it is - wp-admin -> Settings > PriceTapestry.org > External > $config_baseHREF...

Cheers,
David.

Submitted by kempo on Sun, 2011-10-16 08:30

Hi David,
Correcting the external Base HREF solved all the issues.
Thanks!
kempo.

Submitted by Vifil on Tue, 2021-08-24 07:42

I'm having the same problem - all text is printed properly, but when I visit a product, category, merchant or brand with special characters I either get a 404 (products) or empty results (cat/mer/brand).

Example: /product/Snails-%C3%B8jenskygge-mint.html & merchant/Børnenes-Kartel/

When I visit the same urls in my PT installation there's no problem and products are shown.

When I do a search with special characters I do get products returned, fx: /?pto_q=øjenskygge

I've tried different solutions I could find in old notes, but with no succes.
You wrote somewhere to another special characters problem that it might be a mis-match in collation - in my PT installation I've used different dbmods that you have provided me with through the years, so perhaps that has something to do with it?

Thank you in advance

Submitted by support on Tue, 2021-08-24 08:04

Hi,

I notice the URL encoding in the example so it may be down to how WordPress handles the rewrites internally. A urldecode() might do the trick; if you edit the plugin file pto.php and look for the following code at line 506:

  $pto_product = (isset($pto_product)?pto_common_normalise($pto_product,":\."):"");

...and REPLACE with:

  $pto_product = (isset($pto_product)?pto_common_normalise(urldecode($pto_product),":\."):"");

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by Vifil on Tue, 2021-08-24 09:35

Thank a lot for your quick reply.

That didn't help, but I think I found at least some of the problem.
I tried to print the sql statement.

For the url /merchant/Børnenes-Kartel/

... WHERE merchant = 'BC3B8rnenes Kartel' GROUP BY search_name
instead of
... WHERE merchant = 'Børnenes Kartel' GROUP BY search_name

So some encoding somewhere, and I imagine it's the same for the product sql

Submitted by Vifil on Tue, 2021-08-24 10:28

Sorry about that - it actually DID work with the change - for the product urls.

So now I just need to find where to update for the category pages :-)

Submitted by support on Tue, 2021-08-24 11:18

They come through in $pto_q so probably just needs the same mod, so line 500 in pto.php:

  $pto_q = (isset($pto_q)?pto_common_normalise($pto_q,":\.\/"):"");

...REPLACE with:

  $pto_q = (isset($pto_q)?pto_common_normalise(urldecode($pto_q),":\.\/"):"");

Cheers,
David.
--
PriceTapestry.com

Submitted by Vifil on Tue, 2021-08-24 11:41

It works like a charm, thank you very much!