Martin1 Posted November 7, 2013 Posted November 7, 2013 When I do searches containing the special Danish characters (æ ø å) then the search does not return all the results it should. However some products does show, but I'm not sure what's the difference between them and the rest. However if the special letters are contained in the headline the search will find them just fine, it's only a problem when it's in the product description. Does anybody have a clue to what causes this? I'm considering that it could be connected to the text editor we use when creating new products, however how is that possible when the product describtion looks just fine and displays the letters ok. Best regards Martin
Martin1 Posted November 7, 2013 Author Posted November 7, 2013 Sorry, I forgot to tell. I tried it on two different ones. 2.3.3.3 and 2.3.3.4.
MrPhil Posted November 7, 2013 Posted November 7, 2013 Everything is the same encoding (probably UTF-8) -- database (all text/char fields), language support files, page display? The three characters you mentioned are found in both Latin-1 and UTF-8 -- are you using a different encoding at any point? Was the data in the database entered from the keyboard, or was it imported from another source (possibly a different encoding)?
Martin1 Posted November 7, 2013 Author Posted November 7, 2013 Everything is the same encoding (probably UTF-8) -- database (all text/char fields), language support files, page display? The three characters you mentioned are found in both Latin-1 and UTF-8 -- are you using a different encoding at any point? Was the data in the database entered from the keyboard, or was it imported from another source (possibly a different encoding)? I will try to look into the encoding. It was typed by keyboard.
Martin1 Posted November 10, 2013 Author Posted November 10, 2013 I discovered that it is the text editor we was using that did not use the correct danish characters but converts them to for example "æ" It is the CKeditor. However I inserted this in the ckeditor config file config.language = 'da'; config.entities_latin = false; This solved the problem. Now I just have the problem that there's already a lot of product entries in the database with this problem. Does anyone know of a way to correct this besides, editing every product one by one?
burt Posted November 10, 2013 Posted November 10, 2013 Blast the database using phpmyadmin. UPDATE `products_description` SET `products_description` = REPLACE(`products_description`, "& aelig ;", "æ"); Same for any other characters that you need to change. IMPORTANT: make a backup of your database before you do any DB changes. NOte that in the code above I had to write &[space]aelig[space]; for it to show in the forum. You need to not use spaces.
Martin1 Posted November 10, 2013 Author Posted November 10, 2013 Blast the database using phpmyadmin. UPDATE `products_description` SET `products_description` = REPLACE(`products_description`, "& aelig ;", "æ"); Same for any other characters that you need to change. IMPORTANT: make a backup of your database before you do any DB changes. NOte that in the code above I had to write &[space]aelig[space]; for it to show in the forum. You need to not use spaces. I will try this, thank you so much.
MrPhil Posted November 10, 2013 Posted November 10, 2013 And also be careful that the method you use to type in the actual character (in the REPLACE() call) produces a character that matches the field's encoding. You don't want to be sticking a UTF-8 multibyte character into a Latin-1 field or vice-versa. In fact, you should probably try it out on just one entry first (add a WHERE clause to the UPDATE command to restrict it to just one entry, such as product_id='xxxx'). Make sure the result is the right encoding before fixing all the others.
RMD27 Posted July 12, 2014 Posted July 12, 2014 I discovered that it is the text editor we was using that did not use the correct danish characters but converts them to for example "æ" It is the CKeditor. However I inserted this in the ckeditor config file config.language = 'da'; config.entities_latin = false; This solved the problem. Now I just have the problem that there's already a lot of product entries in the database with this problem. Does anyone know of a way to correct this besides, editing every product one by one? where is the config file??
♥joli1811 Posted July 12, 2014 Posted July 12, 2014 where is the config file?? No idea if this helps but a standard ckeditor congiuration file on a 2.3 install is found below here you can customize a bit /admin/ext/ckeditor/config.js now I would think a search on the ckeditors website would help but not sure really if your problem is really the ckeditor or your language settings within the osc framework To improve is to change; to be perfect is to change often.
tgely Posted July 12, 2014 Posted July 12, 2014 where is the config file?? I have figured out a database character conversion module for similar problems. https://github.com/Gergely/oscommerce2-1/commit/d095b89d9b91ae039d7b0b8256c979cf644edff9 if you need support ask me. osCommerce based shop owner with minimal design and focused on background works. When the less is more.Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.