You are here:  » Turkish Character Problems

Support Forum



Turkish Character Problems

Submitted by kempo on Sat, 2007-06-23 08:55 in

I installed pricetapestry and now I am testing it.
During the test procedure I recognized that it has
problems multilingual character codes. I configured
the character set as follows in the config.php file:
$config_charset = "ISO-8859-9";
It is OK at the main search page, because I translated
merchant, category and brand into turkish language and
there is no any character problem.
But When I try to search a product contains turkish letters
like ğ,ş etc. I am getting the results page with turkish
letter errors in the information bar saying the product
could not found. Information bar contains the product
with Turkish letters and Turkish letters are not displaying
correctly.
You can check it on the following link by typing any word
containing turkish letters:
{link saved}
Best regards,

Submitted by support on Sat, 2007-06-23 09:20

Hi,

At the moment, there are no merchants installed on your site, so there will be no product found. I went to your admin page, and although you have uploaded a feed into your /feeds/ directory, it is not yet registered.

To put the merchant on your site you need to complete the registration process for the feed. Please see the instructions on the following page to do this:

http://www.pricetapestry.com/node/133

Once registered, you will then be able to search for products in that merchant!

Cheers,
David.

Submitted by kempo on Sat, 2007-06-23 09:33

It is not necessary to have a merchant uploaded.
I mean, if the system has not the product and
the product has some turkish characters
pricetapestry shows some bad characters for
the product not found.

Submitted by support on Sat, 2007-06-23 09:41

Hello,

I see the problem now.

Are your feeds encoded in ISO-8859-9? This doesn't seem to be supported by my version of PHP so I will have to try and get it installed.

The characters work OK if you have $config_charset = "utf-8" (which also supports Turkish characters). Do you actually need to use 8859-9?

Cheers,
David.

Submitted by kempo on Sat, 2007-06-23 10:54

Yes, I actually need it. When I set $config_charset = "utf-8" my main page and product desription pages gets a lot of rubbish characters on the result pages. I tried and it did not worked even on the main page. Because main page contains a translation of merchant as "Mağaza" and it also contains a turkish character. I set $config_charset = "utf-8" and on the main page now I see Ma�aza, instead of "Mağaza".
Thanks.

Submitted by support on Sat, 2007-06-23 11:16

Hi,

I will look into this for you - I have just read on the PHP website that there are some problems with ISO-8859-9 support in PHP so I hope we can make it work. If it is not going to be suitable for you because of this I will of course refund your money.

Cheers,
David.

Submitted by kempo on Sat, 2007-06-23 11:19

Thank you very very much David,
I must say that I am very satisfied of your support.
Great job.
Kemal.

Submitted by support on Sat, 2007-06-23 14:44

Hello Kemal,

Can you try a work-around for Turkish support like this:

In your config.php, do not have any character set:

$config_charset = "";

Then, in html/header.php, look for this code, which starts at line 4:

  if ($config_charset)
  {
    header("Content-Type: text/html;charset=".$config_charset);
  }

Change this to just:

  header("Content-Type: text/html;charset=ISO-8859-9");

Finally, in includes/tapestry.php, look for the following code in the tapestry_normalise() function, starting at line 22:

    if ($config_charset)
    {
      $allow = chr(0x80).'-'.chr(0xFF).$allow;
    }

Change this to just:

    $allow = chr(0x80).'-'.chr(0xFF).$allow;

These changes will remove the internal character set handling, and rely on the browser to make sure ISO-8859-9 is displayed correctly.

Hope this helps!
Cheers,
David.