AmirMahmood Posted November 12, 2017 Share Posted November 12, 2017 (edited) hi guys first sorry for my bad English. i moved my site to a new host. in my new host, characters seems too don't processed correctly. for example look at uploaded image. title beside of product image has incorrect characters. and other example, some times when i add tags in Persian characters and press save button , it gives me this error: "Property Tag -> name is not valid" i didn't have this problem in my previous host. Edited November 12, 2017 by AmirMahmood SOLVED (see edit history) Link to comment Share on other sites More sharing options...
selectshop.at Posted November 12, 2017 Share Posted November 12, 2017 Ask your provider to check the collation of your database. It should be utf8_general_ci Link to comment Share on other sites More sharing options...
AmirMahmood Posted November 12, 2017 Author Share Posted November 12, 2017 1 hour ago, selectshop.at said: Ask your provider to check the collation of your database. It should be utf8_general_ci collation of my database is utf8_general_ci. i still have the problem Link to comment Share on other sites More sharing options...
selectshop.at Posted November 12, 2017 Share Posted November 12, 2017 You changed it for now, or it was before utf8_general_ci ? Products description added manually or by csv import ? Link to comment Share on other sites More sharing options...
AmirMahmood Posted November 12, 2017 Author Share Posted November 12, 2017 2 hours ago, selectshop.at said: You changed it for now, or it was before utf8_general_ci ? Products description added manually or by csv import ? it was utf8_general_ci. all things added manually. i don't use csv. does php have a way for specifying the encoding of php files ? for example in python we add # -*- coding: utf-8 -*- is there a way for defining Php Source Codes Encodings? and can Source Codes Encoding causes this problem ?? Link to comment Share on other sites More sharing options...
selectshop.at Posted November 12, 2017 Share Posted November 12, 2017 Yes it has in the tempalte. <head><meta charset="utf-8" /> You will find this in the file header.tpl (/themes/yourtheme/header.tpl) Link to comment Share on other sites More sharing options...
AmirMahmood Posted November 12, 2017 Author Share Posted November 12, 2017 2 minutes ago, selectshop.at said: Yes it has in the tempalte. <head><meta charset="utf-8" /> You will find this in the file header.tpl (/themes/yourtheme/header.tpl) i check it. header.tpl had this file before. i don't have any idea. Link to comment Share on other sites More sharing options...
AmirMahmood Posted November 12, 2017 Author Share Posted November 12, 2017 i find some thing. for example my product name is "سشوار و حالت دهنده چرخشی 1000 وات پرنسلی+کیف نگه دارنده مدل PR306" when i use below code, it just show "..." for name insted of "سشوار و حالت دهنده چرخشی 1000 وات پرنسلی+کیف ..." {$product.name|truncate:70:'...'|escape:'html':'UTF-8'} but when i use below code {$product.name|escape:'html':'UTF-8'} it show "سشوار و حالت دهنده چرخشی 1000 وات پرنسلی+کیف نگه دارنده مدل PR306" in my site. it seems characters that inject in tpl files have different encoding and tpl can't modify strings correctly, but when tpl files leave strings wthout any modification, string show correctly in my site. i think tpl didn't get strings in utf8. any idea ? Link to comment Share on other sites More sharing options...
AmirMahmood Posted November 12, 2017 Author Share Posted November 12, 2017 OK problem solved. mb_string extension was not active. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now