Dager Posted November 25, 2011 Posted November 25, 2011 I do have some experience in osCommerce 2.2, however since I started new shop based on 2.3 I cannot fix some encoding (?) problems. Every text, every label is displayed correctly (UTF-8), however when I log into my phpMyAdmin, every local letter is not displayed correctly, and if I want to change anything by hand using local letters, they do display correctly in phpMyAdmin, but not on the site. I didn't know what to do, so I left it as it was untouched. Every order I received since (4-5 orders, it's a new shop) where ok, no problem with encoding. Since today, like 4th, or 5th order and now I didn't get a single correct local letter in whole e-mail. The same on the admin site of the store, in every customer's data I got question mark in black rhombus instead of local letter. I can't remember changing anything that would affect this since previous order, so I don't really know the reason. Anyway I decided to fix this while it's time. I was looking for encoding/displaying settings in phpMyAdmin, but all I found was "MySQL connection collation" <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> setlocale(LC_TIME, 'pl_PL.UTF8', 'pl.UTF8', 'pl_PL.UTF-8', 'pl.UTF-8'); Any help would be appreciated :)
MrPhil Posted November 25, 2011 Posted November 25, 2011 Googling for php setlocale utf-8, I found a warning in the NOTES section of http://php.net/manua...n.setlocale.php that with multithreading, you can unexpectedly jump in and out of setlocale() settings. There are apparently other limitations to setlocale(), such as not being used by date(). You might want to read up on this call and see if any of it might be happening to you. Anyway, if your database is UTF-8 everywhere (collation doesn't matter as much, but the encoding should be UTF-8), and your fixed language support files are all UTF-8, and your page character encoding is UTF-8, it ought to work. Is this 2.3.1 installation on a different server than your 2.2 shop? Sometimes servers are configured to override the page encoding and force Latin-1. The fact that you're getting the ?-in-diamond sounds like you are displaying in UTF-8. All your Polish language file contents (prompts, labels, etc.) are coming up OK? It's just user data that isn't? (from the database) I'd carefully recheck your database -- it sounds like it might still be using the default Latin-1 (Swedish collation) encoding in at least some fields or tables.
Dager Posted November 26, 2011 Author Posted November 26, 2011 Thanks for Your reply. I did check setlocale issues before with no result, it looks to be fine. Everything seems to be set to UTF-8 correctly, including site and language files. Stores are set on a different servers and databases. Since the problem is only with user-data storage and displaying (all) data in phpMyAdmin, I do believe it's the database itself, or connection store <-> db.
Dager Posted November 26, 2011 Author Posted November 26, 2011 I did notice - if i put any data into database "by hand" in phpMyAdmin, it is displayed correctly on site if converted from iso-8859-2... iconv("iso-8859-2", "UTF-8", xxx), but main page of phpMyAdmin says: MySQL charset: UTF-8 Unicode (utf8)... I'm a bit confused :)
Dager Posted November 26, 2011 Author Posted November 26, 2011 Isn't that the problem? character_set_client utf8 character_set_connection utf8 character_set_database utf8 character_set_filesystem binary character_set_results utf8 character_set_server latin2 character_set_system utf8
MrPhil Posted November 26, 2011 Posted November 26, 2011 "Latin-2" as a setting certainly looks out of place among all the UTF-8 settings. According to http://dev.mysql.com/doc/refman/5.0/en/charset-server.html, MySQL has split the collation and character set into two settings, and it looks like yours is inconsistently set.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.