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: 753

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: 19124
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: 753

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: 19124
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: 753

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: 19124
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: 753

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: 19124
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

 

Board footer