Jump to content

problem with encoding characters


petros

Recommended Posts

Hi,

I use prestashop 1.2.5 final,

this is what is see when i choose to view the source code of my shops' home page:

<html >
   <head>
       <title>MOTO STAMATIS - ΑνταλλακτικΞ¬ & αξεσουΞ¬ρ μοτοσυκλετΟ�ν</title>
       <meta name="description" content="Shop powered by PrestaShop" />

       <meta name="keywords" content="shop, prestashop" />
       <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />



If you wanna take a look, my site is at http://web-etrade.eu

My default language and translation is Greek.

As you can see the letters between the TITLE tags does not appear correct.

This means that... google (and all other search engines) is dead for me, so... my site is propably useless.

Whatever i write in Greek, appears in that way at the source code, but correct at the front end...

Is there any way to fix this issue;

Is there any way to change the way that prestashop generates the content character encoding for the index.php page;

Perhaps if i manage to say to prestashop if id_lang=1 then use utf-8 but if id_lang=3 the use iso-8859-7 in order for the greek characters to be displayed correct.

If it is impossible to achieve this (at least at this version of prestashop), does anyone knows any workaround to at least the TITLE and all the META TAGS apeear correct in Greek so it will be possible to have a hit at search engines;

Moreover where in the back office can i change the values for the KEYWORDS & DESCRIPTION meta tags;

Sorry for the long post.

Have a good day.

Link to comment
Share on other sites

  • 2 weeks later...

ok, i see no responce.

does this REALLY affect google;

any workaround;

it is most possible that if this matter will not be fixed in the future,
prestashop is pretty much useless for greek user.

i saw oscommerce does not have this issue with its translating system.

is it so dufficult for prestashop to achieve this;

pitty for a great app (prestashop) like this...

Link to comment
Share on other sites

  • 2 weeks later...

I found the solution.
You have to take off the |escape:'htmlall':'UTF-8' from 3 lines in your header.tpl:
======================================================================

<html >
<head>
<title>{$meta_title|escape:'htmlall':'UTF-8'}</title>
{if isset($meta_description) AND $meta_description}
<meta name="description" content="{$meta_description|escape:htmlall:'UTF-8'}" />
{/if}
{if isset($meta_keywords) AND $meta_keywords}
<meta name="keywords" content="{$meta_keywords|escape:htmlall:'UTF-8'}" />
{/if}
=================================================

and make it like this:
====================================================

<html >
<head>
<title>{$meta_title}</title>
{if isset($meta_description) AND $meta_description}
<meta name="description" content="{$meta_description}" />
{/if}
{if isset($meta_keywords) AND $meta_keywords}
<meta name="keywords" content="{$meta_keywords}" />
{/if}
==================================================
And now it works ok.
www.tsantes.gr

Link to comment
Share on other sites

  • 1 month later...

Hi
ok "tsopis", you fix the text in the header, BUT what about the rest of the page.
All the Greek characters is in "html entity codes" format
This is wrong!
If the prestashop is working in utf-8 that means that all the characters must be correct in the source code of the page.

Now as it is, the translation from "html entity codes" to characters is made by the browser.

All the Categories, the products and any other text I add from the admin area is appear OK (as normal character in the source code of the page)
So the problem comes from the way that the prestashop developers is handle the language packs
Maybe some ware in the code the programmers made a conversion from utf-8 to "html entity codes"
THIS IS SOMETHING THAT THE DEVELOPERS HAVE TO GIVE VERY MUCH ATTENTION.
Please, give as some more information about to find solution.

thank you

Link to comment
Share on other sites

  • 3 years later...

Hi

ok "tsopis", you fix the text in the header, BUT what about the rest of the page.

All the Greek characters is in "html entity codes" format

This is wrong!

If the prestashop is working in utf-8 that means that all the characters must be correct in the source code of the page.

 

Now as it is, the translation from "html entity codes" to characters is made by the browser.

 

All the Categories, the products and any other text I add from the admin area is appear OK (as normal character in the source code of the page)

So the problem comes from the way that the prestashop developers is handle the language packs

Maybe some ware in the code the programmers made a conversion from utf-8 to "html entity codes"

THIS IS SOMETHING THAT THE DEVELOPERS HAVE TO GIVE VERY MUCH ATTENTION.

Please, give as some more information about to find solution.

 

thank you

 

This issue persists even today in the latest version. Anyone found a more global solution ?

  • Like 1
Link to comment
Share on other sites

  • 4 months later...

Hello,

 

I had this problem with cyrillic characters, but it was the same issue.

I modifed the file header.tpl and it worked

 

You have to replace in header.tpl of your template directory: 

<title>{$meta_title|escape:'htmlall':'UTF-8'}</title>

 

By:

<title>{$meta_title|escape:'html':'UTF-8'}</title>

 

I hope it will help help, as this is big issue for SEO

Link to comment
Share on other sites

  • 4 months later...
  • 2 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...