Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 11-01-2018 10:09:59

sdn
Member
From: UK
Registered: 05-29-2007
Posts: 882

Corrupted Symbols in Display Name / Meta Titles

The software is corrupting symbols like the "°" when used in the Display Name / Meta Titles fields. If we enter as ° using the management interface, the software correctly converts this to a ° when saved. If you then go back in to Update the product, once saved the ° becomes a ?. It is annoying and easy to forget you need to reenter the ° as "°". So far as I can see, the ? only appears in the mini search results. The product page still correctly displays ° so would this be a java error? How to fix?

Last edited by sdn (11-01-2018 10:13:22)


Simon

Offline

 

#2 11-02-2018 09:19:58

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Corrupted Symbols in Display Name / Meta Titles

I believe this is an encoding issue.  You may need to add ° to the encoding function - xhtml_translate() - in {private}/core/CORE/CORE.php.  That should be part of the translation table already, but your PHP configuration may not have that entry.


Nick Hendler

Offline

 

#3 11-06-2018 04:29:17

sdn
Member
From: UK
Registered: 05-29-2007
Posts: 882

Re: Corrupted Symbols in Display Name / Meta Titles

I tried adding to CORE.PHP just under the line     $trans['®']     = '&#174'; (I have deliberately omitted the";" in this post to stop the entities being converted into the symbol when submitted)

     $trans['°']     = '°';

I also tried &#176 and &#xB0

All made the situation worse in that after saving a product with &#deg; or &#176 or &#xB0 or ° in the title the minisearch result is always displays ? instead of °. This is a very commonly used symbol so why does it not work?

Last edited by sdn (11-07-2018 02:33:47)


Simon

Offline

 

#4 11-07-2018 08:51:36

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Corrupted Symbols in Display Name / Meta Titles

I assume you're fully updated to version 9.0.2.  Please make sure you have this in your .htaccess file:

Code:

AddDefaultCharset Off

Also, make sure the encoding on all the K9 database tables is latin1 (FYI: With release 9.0.2 all tables are encoded latin1, but if you updated to 9.0.2 you may have UTF8 tables - depending on how PHP is configured on your server). 

Beyond that, I'd recommend changing the following line in CORE::xhtml_translate():

Code:

$find = '&(?![A-Za-z]{0,4}\w{2,3};|#[0-9]{2,3};)';

To:

Code:

$find = '&(?![A-Za-z]{0,4}\w{2,3};|#[0-9]{2,4};)';

We recently found that change is needed to handle four digit encoded values, which are becoming more common these days.  That will be part of the 9.0.3 update.


Nick Hendler

Offline

 

#5 11-07-2018 11:47:35

sdn
Member
From: UK
Registered: 05-29-2007
Posts: 882

Re: Corrupted Symbols in Display Name / Meta Titles

I made the changes recommended and retried the experiments detailed above but still the same problem as before.


Simon

Offline

 

#6 11-12-2018 07:50:59

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Corrupted Symbols in Display Name / Meta Titles

You probably tried adding this, but please confirm:

$trans['°']     = 'XXXXXXX';

Where 'XXXXXXX' is '& # 1 7 6 ;' without spaces (forum will echo degree symbol if I type it right).  Did you try that one?


Nick Hendler

Offline

 

#7 11-13-2018 11:19:26

sdn
Member
From: UK
Registered: 05-29-2007
Posts: 882

Re: Corrupted Symbols in Display Name / Meta Titles

Yes, and "&deg ;" and "&#xB0 ;" (without the space).

Last edited by sdn (11-13-2018 11:19:48)


Simon

Offline

 

#8 11-16-2018 08:27:51

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Corrupted Symbols in Display Name / Meta Titles

I'm out of ideas.  Perhaps you should open a ticket with us and I can login and investigate further.


Nick Hendler

Offline

 

#9 07-14-2019 03:35:47

sdn
Member
From: UK
Registered: 05-29-2007
Posts: 882

Re: Corrupted Symbols in Display Name / Meta Titles

I know you are understandably sick of this topic but we still get the character corruption despite the changes you made.

Researching a different server issue, I bumped into the page at https://www.interserver.net/tips/kb/wha … o-enable/. Did we try using mbstring? It is not installed on cPanel server by default. Is it the missing link that stopped your attempts from working?

Last edited by sdn (07-15-2019 15:08:15)


Simon

Offline

 

#10 07-15-2019 12:26:30

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Corrupted Symbols in Display Name / Meta Titles

The software only uses mbstring() via a couple of PEAR modules (seding multibyte mail messages, caching JSON results).  I'd like you to verify that the changes to CORE.php and the htaccess file addition in post #4 above are part of your install (9.0.3).  If so, can you run a phpinfo() script and see what encoding is being used?  Also verify the encoding on your database tables?


Nick Hendler

Offline

 

#11 07-16-2019 14:09:03

sdn
Member
From: UK
Registered: 05-29-2007
Posts: 882

Re: Corrupted Symbols in Display Name / Meta Titles

I picked the wrong topic as I was really asking about the corruption to customer address details but now we are here...

For some reason mbstring was not in our php71 install so I added it yesterday. The "°" symbol used in prod descriptions has been working fine even though it was not listed in core.php but htaccess was correct. I also added this to core.php:

     $trans['±']     = '&#1 7 7;';


Simon

Offline

 

#12 07-17-2019 07:54:07

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Corrupted Symbols in Display Name / Meta Titles

Is that the degree character or the plus/minus?  You reference both in your post.  And, did that solve the issue?  Thanks.


Nick Hendler

Offline

 

#13 07-17-2019 08:25:58

sdn
Member
From: UK
Registered: 05-29-2007
Posts: 882

Re: Corrupted Symbols in Display Name / Meta Titles

I think we are good on this now thanks.


Simon

Offline

 

Board footer