Page 1 of 1
Unrecognised letters
Posted: Mon Mar 24, 2008 8:34 pm
by Fresher
Hi. I added lithuanian language in my site. but when i write product description in lithuanian, at shop page the system doesnt recognise letters..it became "??" ... what i could change to make it work? :/
Re: Unrecognised letters
Posted: Tue Apr 01, 2008 11:57 am
by setekh
Fix your database collation...
PhpMyAdmin -> and fix your table, or just drop it and create another one... Use utf8_general_ci and you would not have a problem with cyrillic characters, i am from Bulgaria and my language is cyrillic as well so ... Also check your connection collation so it is set to utf8 as well

Re: Unrecognised letters
Posted: Tue Apr 01, 2008 5:29 pm
by Fresher
which encoding you are using in your language script? i mean in this shop/catalog/language/bulgarian/bulgarian.php
Re: Unrecognised letters
Posted: Tue Apr 08, 2008 11:06 pm
by Fresher
can somebody help me with this shit error...i must build my page! :/
Re: Unrecognised letters
Posted: Wed Apr 09, 2008 7:30 am
by bruce
You are going to have to check each step in the process to see where it becomes broken.
The first place is the data saved in the product description in the database, to see if it is stored as the correct characters.
Re: Unrecognised letters
Posted: Wed Apr 09, 2008 5:04 pm
by Fresher
yes, everything is correct in data base (mysql) but in the letter or in the shop page no lithuanian characters..(i mean product info and payment confirm.)..
Re: Unrecognised letters
Posted: Wed Apr 09, 2008 10:14 pm
by bruce
I had a look around the sites you gave me but cannot be sure that I am looking at the problem. Could you set up a demonstration, specify the database and store urls and I will go back again.
Re: Unrecognised letters
Posted: Thu Apr 10, 2008 4:33 pm
by Fresher
http://fresheris.webhosting4free.info/s ... oduct_id=5
the discription is without lithuanian letters..
and here is example from mysql:
the word
vėjas is with normal lithuanian characters but the shop page isnt able to recognise it..
i write you pm with my logins.
Re: Unrecognised letters
Posted: Sat Apr 12, 2008 6:00 pm
by Fresher
any progress?
Re: Unrecognised letters
Posted: Sun Apr 13, 2008 2:43 pm
by bruce
Its not the database. I can paste the values into the database and they look ok.
As for the rest, I am sorry but I do not know. What is interesting is that the values from the language files display ok, so it is not any html headers or the css that are causing the problem. Hence, it is likely that the database connection messes them up. Another reason for thinking this is that if I try to save the lithuanian letters from the admin pages, they are corrupted in the database.
Over to you.
Re: Unrecognised letters
Posted: Sun Apr 13, 2008 7:26 pm
by Fresher
thanks man. i also think that the problem is somewhere between admin panel and database... somewhere in scripts.. shit how to correct everything :/ i am going crazy

Re: Unrecognised letters
Posted: Sun Apr 13, 2008 8:54 pm
by bruce
Yeah, I am not surprised. Everything that can go wrong seems to have landed on you.
I do not believe it is in the scripts or the admin. Remember that the text from the language files is displaying ok. I can get the correct text into the database using phpmyadmin. It is only if we try to send the text to the database from the admin or to display the (correct text) from the database that it goes wrong. Hence, I suspect that the corruption is somehow occurring during transport to and from the database.
Re: Unrecognised letters
Posted: Sun Apr 13, 2008 8:59 pm
by Fresher
yech... maybe i should try another server? it tried to use ascii codes and it worked (manualy added to database).. something misterouse...
Re: Unrecognised letters
Posted: Mon Apr 14, 2008 10:14 pm
by Fresher
solved.
Re: Unrecognised letters
Posted: Mon Apr 14, 2008 11:00 pm
by Luvz2drv
solution???
Re: Unrecognised letters
Posted: Tue Apr 15, 2008 1:04 am
by Fresher
i was changed the chartset to windows-1257 in lithuanian.php file. but the problem was in saving translated files. as i was editing them by notepad after saving, they saved as "ANSI" encoding. i changed it to UTF-8 , also changed the charset to utf8 in language file. No problems know!

to sum it up: after translating files with notepad dont forget to save it with utf-8 encoding.
sorry for my english.
Re: Unrecognised letters
Posted: Tue Apr 15, 2008 1:26 pm
by Luvz2drv
no worries about your english.. 100% good.. and thanks for the answer.. that could prove to be troublesome and good to have documented here
thanks
Luvz2drv
Re: Unrecognised letters
Posted: Fri Sep 12, 2008 6:44 am
by mrtwisteryu
Fresher wrote:
Hi. I added lithuanian language in my site. but when i write product description in lithuanian, at shop page the system doesnt recognise letters..it became "??" ... what i could change to make it work? :/
I had the same issue (with Serbian letters) and adding
mysql_query("set names 'utf8'"); to the
database.php file resolved the problem. You should add it in
function connect with the other two queries. The location of the
database.php is:
SHOP_DIRECTORY\library\database
cheers
edit: you should also modify
order.php from the SHOP_DIRECTORY\library\cart\ folder. Add following piece of code:
$order_info = preg_replace('!s:(\d+):"(.*?)";!se', "'s:'.strlen('$2').':"$2";'", $order_info );
to the
function load($reference) before the next line:
$this->data = unserialize($order_info['data']);
And that should prevent some "Cannot modify header information.." warnings.
And, as someone already wrote: after translating files with notepad don't forget to save it with utf-8 encoding without bom.