Greek characters showing as char$ codes at some places only
So, I have setup a shop from scratch and I am almost done, customized everything with help from the already existing posts but this one, I just can't find anything exactly the same as mine.
First of all, I have v1.3.9f installed as new and I have installed the Greek language pack. I have altered some tables and fields in phpMyAdmin by changing the MySQL connection collation to greek_general_ci (after install while data in the db) and also changed categories and products size to 256 and collation to greek again. I changed size because Greek where stored as something like this: (965;πρίων Λαϊκων Ποιητών&t) which made the field much larger.
Now the shop displays all Greek characters correctly BUT I have problems with the following cases:
1) When a user registers or buys, the e-mail that he receives displays all the Greek characters that are taken from php files but the data that are taken from the database (i.e. store name, address, etc) which are Greek, are displayed as the example above.
2) When the user check out, the Paypal form shows the purchased item in the same way
3) The Admin console shows Greek ok except the modules (all 3) which cannot detect browser encoding. If I manually select Greek, I will see it but as soon as I click on an option it turns to garbage again.
This is my biggest problem so far. I did my research and found many similar postings but not exactly as this. Any help apreciated.
Re: Greek characters showing as char$ codes at some places only
Update:
I noticed that the Greek.php file in Admin folder was:
define('CHARSET', 'iso-8859-1');
although the normal one was:
define('CHARSET', 'ISO-8859-7');
I changed the admin to 'ISO-8859-7'
and:
1) All characters in Admin/modules where ok
2) Paypal checkout and email still shows ##dfd#d#fdf#sd#f# like before
3) Now if I edit the greek names in configuration that before appeared as above, now they appear as ????????
I changed to utf-8 but now they appear as diamonds.
I changed to as it was before and at least now the #fdsf#sd#fd#f codes translate back to Greek.
Re: Greek characters showing as char$ codes at some places only
I think I made quite a progress and I haven't seen this in other posts.
This is what I did:
In phpMyAdmin, I changed default db collation to UTF8-unicode-ci. I did the same for all tables and fileds that contain greek.
For Admin and shop I used iso-8859-7.
Now:
- Admin/modules shows Greek characters
- In configuration, categories, products, after the data is entered in Greek, it stays Greek, not #f#fd#fdf#f#df#
- e-mails sent to users are in Greek and not #f#dfg#dfg#dfg#
However:
- codes like "&trade , #euro, etc.) are transformed to ##fgd#gf
- phpMyAdmin cannot show the greek characters. I don't care but I am concerned. If it doesn't show there, maybe it won't show somewhere else as well.
- Biggest issue is that Paypal express checkout shows the description as a row of squares which if I try to copy/paste here, appear as diamonds. (�����). This one I really don't know how to start fixing. I tried modifying Paypal webpage encoding but it doesn't seem to matter. Please help at least on this one.
Re: Greek characters showing as char$ codes at some places only
You need to use the SAME character set everywhere. If you want to use iso-8859-7, then use that everywhere. But, since your database probably doesn't give you that option, best to choose UTF-8.
So, use UTF-8 (utf8-general-ci) in your database, for the database, all the tables, and all the fields inside those tables.
And, in Zen Cart, use UTF-8 as well.
Then, re-edit ALL your language files and save them as UTF8-without-BOM encoding, fixing all the text to display properly.
Then, re-edit ALL your database data that you've entered from the admin side, and fix all the characters so they display properly.
Then, set your PayPal encoding to UTF-8 as well.
Once you have *everything* set to the same character set, AND you've re-edited *everything* so all the characters display properly in that character set, things should work fine.
Mixing character sets is always going to give you trouble.
Re: Greek characters showing as char$ codes at some places only
Quote:
Originally Posted by
DrByte
You need to use the SAME character set everywhere. If you want to use iso-8859-7, then use that everywhere. But, since your database probably doesn't give you that option, best to choose UTF-8.
So, use UTF-8 (utf8-general-ci) in your database, for the database, all the tables, and all the fields inside those tables.
And, in Zen Cart, use UTF-8 as well.
Then, re-edit ALL your language files and save them as UTF8-without-BOM encoding, fixing all the text to display properly.
Then, re-edit ALL your database data that you've entered from the admin side, and fix all the characters so they display properly.
Then, set your PayPal encoding to UTF-8 as well.
Once you have *everything* set to the same character set, AND you've re-edited *everything* so all the characters display properly in that character set, things should work fine.
Mixing character sets is always going to give you trouble.
UTF-8 in php files will result in diamonds being displayed and the files layout being damaged (even if I reedit text in the db).
I already edited all the text I entered and I believe it is fine now. I don't know how the Paypal page works though. I don;'t think that encoding option in paypal matters because I tried to change to something like chineese or russian and nothing changed there. I believe it has to do with how zen cart exports it there. Do you have any idea of the control that handles this?
Re: Greek characters showing as char$ codes at some places only
Zen Cart reads the data from your language files and from the database, and sends it to PayPal the same way it sends it to the screen and to email for order confirmations.
Re: Greek characters showing as char$ codes at some places only
Quote:
Originally Posted by
DrByte
Zen Cart reads the data from your language files and from the database, and sends it to PayPal the same way it sends it to the screen and to email for order confirmations.
Yes, of course, I understand this. The issue is that it displays the characters on the screen and email correctly but only on Paypal checkout as squares. There must be something different there. Why does it send my product names in Greek by email but to Paypal as squares?
Maybe it has to do with Paypal? I changed the options there. However I am not sure if it keeps them because if I select one of the standard languages there (4-5) - (Chineese, russian, etc.) it keeps them. If I go to more options and select UTF-8 or iso 8859-7, when I retun, I always see western so I am not sure if it keeps that setting. If I select Korean, it will be there later.
Re: Greek characters showing as char$ codes at some places only
You may have to ask PayPal about that.
Re: Greek characters showing as char$ codes at some places only
Quote:
Originally Posted by
DrByte
You may have to ask PayPal about that.
Ok, Paypal confirmed that they cannot support non-English characters at the moment.
So, the only way for this to work is while I am working in Greek, only at Paypal checkout to pass the English product name instead of the Greek one.
Does anyone know how I could achieve this or maybe it is not possible?
Re: Greek characters showing as char$ codes at some places only
Quote:
Originally Posted by
DrByte
You need to use the SAME character set everywhere. If you want to use iso-8859-7, then use that everywhere. But, since your database probably doesn't give you that option, best to choose UTF-8.
So, use UTF-8 (utf8-general-ci) in your database, for the database, all the tables, and all the fields inside those tables.
And, in Zen Cart, use UTF-8 as well.
Then, re-edit ALL your language files and save them as UTF8-without-BOM encoding, fixing all the text to display properly.
Then, re-edit ALL your database data that you've entered from the admin side, and fix all the characters so they display properly.
Then, set your PayPal encoding to UTF-8 as well.
Once you have *everything* set to the same character set, AND you've re-edited *everything* so all the characters display properly in that character set, things should work fine.
Mixing character sets is always going to give you trouble.
Hallo,
I have performed those steps, everything works fine with zen-cart, emails, database etc.
However, when it comes to PayPal IPN, I see diamonds in all fields of credit card payment, (name surname, address) except for the optional second line of the address which is the only one that appears in fine Greek letters!!!
Wow! How can this be done? This line is saved in the same database entry along with the other data (name surname address etc). Why does it appear OK, while the other data appear as diamonds?
When I tried express checkout, all Greek letters were perfectly transfered from paypal to zen cart. Seems like the other way round has a partial (!) issue.
Kind regards,
orange_juice