Post by Fresher » Mon Mar 24, 2008 8:34 pm

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? :/

New member

Posts

Joined
Thu Mar 13, 2008 5:40 pm

Post by setekh » Tue Apr 01, 2008 11:57 am

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 ;)

BG'08


Newbie

Posts

Joined
Tue Apr 01, 2008 11:48 am

Post by Fresher » Tue Apr 01, 2008 5:29 pm

which encoding you are using in your language script? i mean in this shop/catalog/language/bulgarian/bulgarian.php

New member

Posts

Joined
Thu Mar 13, 2008 5:40 pm

Post by Fresher » Tue Apr 08, 2008 11:06 pm

can somebody help me with this shit error...i must build my page! :/

New member

Posts

Joined
Thu Mar 13, 2008 5:40 pm

Post by bruce » Wed Apr 09, 2008 7:30 am

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.

Active Member

Posts

Joined
Wed Dec 12, 2007 2:26 pm

Post by Fresher » Wed Apr 09, 2008 5:04 pm

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.)..

New member

Posts

Joined
Thu Mar 13, 2008 5:40 pm

Post by bruce » Wed Apr 09, 2008 10:14 pm

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.

Active Member

Posts

Joined
Wed Dec 12, 2007 2:26 pm

Post by Fresher » Thu Apr 10, 2008 4:33 pm

http://fresheris.webhosting4free.info/s ... oduct_id=5

the discription is without lithuanian letters..

and here is example from mysql:

Code: Select all

5  	2  	H1-H13  	<p>vėjas</p>
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.

New member

Posts

Joined
Thu Mar 13, 2008 5:40 pm

Post by Fresher » Sat Apr 12, 2008 6:00 pm

any progress?

New member

Posts

Joined
Thu Mar 13, 2008 5:40 pm

Post by bruce » Sun Apr 13, 2008 2:43 pm

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.

Active Member

Posts

Joined
Wed Dec 12, 2007 2:26 pm

Post by Fresher » Sun Apr 13, 2008 7:26 pm

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

New member

Posts

Joined
Thu Mar 13, 2008 5:40 pm

Post by bruce » Sun Apr 13, 2008 8:54 pm

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.

Active Member

Posts

Joined
Wed Dec 12, 2007 2:26 pm

Post by Fresher » Sun Apr 13, 2008 8:59 pm

yech... maybe i should try another server? it tried to use ascii codes and it worked (manualy added to database).. something misterouse...

New member

Posts

Joined
Thu Mar 13, 2008 5:40 pm

Post by Fresher » Mon Apr 14, 2008 10:14 pm

solved.

New member

Posts

Joined
Thu Mar 13, 2008 5:40 pm

Post by Luvz2drv » Mon Apr 14, 2008 11:00 pm

solution???

Global Moderator

Posts

Joined
Fri Mar 21, 2008 10:58 am

Post by Fresher » Tue Apr 15, 2008 1:04 am

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.

New member

Posts

Joined
Thu Mar 13, 2008 5:40 pm

Post by Luvz2drv » Tue Apr 15, 2008 1:26 pm

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

Global Moderator

Posts

Joined
Fri Mar 21, 2008 10:58 am

Post by mrtwisteryu » Fri Sep 12, 2008 6:44 am

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.
Last edited by mrtwisteryu on Fri Sep 12, 2008 6:55 am, edited 1 time in total.

Newbie

Posts

Joined
Mon Aug 04, 2008 9:08 am
Who is online

Users browsing this forum: No registered users and 7 guests