SubjectX Posted March 2, 2013 Posted March 2, 2013 http://www.hmr-motoshop.si/index.php If you go through Kategorije (Categories) you will see that some of the charachters are problematic. Its čćšđž which are giving me problems. Where to start fixing this? MySQL DB is set to UTF-8. I have all encodings set to latin or UTF-8 and no solution has been yet found. I have managed to use special characters with codes eg.: ž is ž but this is not a solution (first main category ) Also, if I replace problematic char in mysql database with ž for example, front-end and database is fine, but if I reload product list in back-end, there is a black ? instead of a char. Please help
MrPhil Posted March 3, 2013 Posted March 3, 2013 Its čćšđž which are giving me problems. Those are all in UTF-8 and in Latin-2 (ISO-8859-2). MySQL DB is set to UTF-8. I have all encodings set to latin or UTF-8 and no solution has been yet found. Whoa, whoa, whoa! ALL encodings in your site must be the same: the database, the language support files, and the output page. You cannot mix encodings. You cannot stick a Latin-2 encoded character into the middle of some UTF-8 encoded text, and vice-versa. I have managed to use special characters with codes eg.: ž is ž but this is not a solution Correct. It is unnecessary to use HTML entities at all for UTF-8, and is unnecessary for Latin-2 for that character (it is native to that encoding). there is a black ? instead of a char. If that's a ?-in-a-black-diamond, it's telling you that it's trying to output the page in UTF-8, but you're giving it a character encoded in something else (e.g., Latin-2). They are not compatible -- in Latin-2 it's a single byte while in UTF-8 it's a 2 or 3 byte sequence.
SubjectX Posted March 3, 2013 Author Posted March 3, 2013 Can you point me in the right files, where i should change everything? I know how to change it in MySQL, I know about that config file, but where else should I look?
MrPhil Posted March 3, 2013 Posted March 3, 2013 What are your language support files (labels, fixed text, prompts, etc.) written in? They should be either UTF-8 or Latin-2. English language files will work the same in either, but Slovenian would likely be one or the other (or could be in yet another encoding!). Usually one of the first lines of the <language name>.php file will give the locale and encoding used. I would change the database to be the same encoding, and make sure the page display is in that coding.
SubjectX Posted March 3, 2013 Author Posted March 3, 2013 I dont understand the first question, which files do you have in mind? I have this in slovenian.php: @setlocale(LC_TIME, 'sl_SI.ISO_8859-2'); define('CHARSET', 'windows-1250');; MySQL settings: Server charset: UTF-8 Unicode (utf8) And collation on osc database is: latin2_croatian_ci By the looks, everything is borked, right?:D What should I change to what now? Everything to UTF8?
MrPhil Posted March 3, 2013 Posted March 3, 2013 slovenian.php and other ".../language/slovenian/..." files. Your system is trying to use Windows-1250 as its character set. That must be what the language support files were written in (assuming they all came from the same place). Windows-1250 (CP-1250) should be very close to Latin-2/ISO-8859-2 (probably with "Smart Quotes" characters added). Anyway, that determines what your database and page encoding should be. phpMyAdmin has several "cp1250" flavors -- none specifically collated for Slovenian, but "cp1250_general_ci" or "cp1250_croatian_ci" might be close enough. If your database has already been converted to UTF-8, you may have trouble converting to CP-1250 (Windows-1250). Make a backup before trying to convert it. The alternative would be to find a way to convert (re-encode) all your language files into UTF-8 (if your database is already fully UTF-8) and change the encoding locale and CHARSET in slovenian.php to UTF-8. You would have to find a translation utility or service (google for it). Also check if there is already a UTF-8 version of Slovenian language files available for your osC version. Don't forget any additional text used in any add-ons you've installed. I'm not sure what state your database is actually in -- are the individual fields in UTF-8 or Latin-2 (with Croatian collation)? Was the text data (fields) actually converted to UTF-8 at some point? You want to get your database consistently one or the other, not a mixture where it's not clear what's going on. What does phpMyAdmin tell you that the individual fields are in? What page encoding is phpMyAdmin itself using when you browse table contents?
SubjectX Posted March 4, 2013 Author Posted March 4, 2013 OK, I'll do that I guess, but let me remind you, that I dont have problems with sole translation of osc, I have problem with characters when I input then in backend. So the translation from backend to mysql databse is a problem, since it borkes chars there..
SubjectX Posted March 5, 2013 Author Posted March 5, 2013 OK, I solved the problem. I had wrong defined charset in admin//languages/english.php. Tnx alot for help
pilon Posted October 23, 2013 Posted October 23, 2013 Hello, I have a big problem with special characters, i install oscommerce 2.3 and portuguese language, but in admin the categories name show with codes... for example Domésticos = Dom?sticos... Can anyone help me?
Guest Posted October 24, 2013 Posted October 24, 2013 Hello, I have a big problem with special characters, i install oscommerce 2.3 and portuguese language, but in admin the categories name show with codes... for example Domésticos = Dom?sticos... Can anyone help me? Long story short: Read the post above. p.s. Don`t start new Topic in already existing one!
pilon Posted October 24, 2013 Posted October 24, 2013 I dont star a new Topic, i just post a reply... and what topic you want i read?
Guest Posted October 24, 2013 Posted October 24, 2013 I dont star a new Topic, i just post a reply... and what topic you want i read? Read this topic from start, your question is already answered.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.