0

I am new here and please excuse me if I'm asking my question wrong or whatever.

I converted my old forum which was vbulletin to invision power board and I noticed that I have a turkish character problem in my forum:

ğ = ð
ı = ý
ş = þ

^They are looking like that and I need to fix this, unfortunately the support can't help me with this, since the issues was caused on vbulletin, so I have to fix it by myself and I thought I could just replace the wrong letters with the correct one, but ipb doesn't support such a function so I must do it in the db. So here is my question, is there a way to do it through phpmyadmin? Just replace the wrong letters with the right now?

  • are you using utf-8? – B001ᛦ Mar 01 '16 at 13:46
  • This post is extremely worthwhile reading, it will keep you out of 99% of similar problems now and in the future: http://stackoverflow.com/a/279279/3536236 – Martin Mar 01 '16 at 14:05
  • Also this may help you: http://stackoverflow.com/questions/15495008/is-there-a-way-to-convert-all-existing-table-data-to-utf8-collation – Martin Mar 01 '16 at 14:07

2 Answers2

1

Run this command on the individual tables

UPDATE table_name SET column_name = REPLACE (column_name, 'Item to replace here', 'Replacement text here');
Orion
  • 125
  • 11
  • uhlmm, i don't follow, what do you mean?. But i've tried such and it worked for me. – Orion Mar 01 '16 at 14:01
  • sorry I got confused. it's ok, I read your code and thought you where changing the name of the column, but I realise that's well out. Lunch time. – Martin Mar 01 '16 at 14:03
  • I did exactly what you said, but I am getting later this issue -> #1270 - Illegal mix of collations (latin1_swedish_ci,IMPLICIT), (utf8_general_ci,COERCIBLE), (utf8_general_ci,COERCIBLE) for operation 'replace' –  Mar 02 '16 at 15:54
  • okay, run this snippet then try again, `SET collation_connection = 'utf8_general_ci'` then for your database, `ALTER DATABASE db CHARACTER SET utf8 COLLATE utf8_general_ci` `ALTER TABLE table CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci` – Orion Mar 04 '16 at 11:56
0

Have a look at the following in MySQL using a replace() in your query, you can change the characters providing you have the correct character set.

UPDATE table
SET colname = REPLACE(colname, 'ğ', 'ð')
WHERE ...
awinwood
  • 135
  • 7
  • I did exactly what you said, but I am getting later this issue -> #1270 - Illegal mix of collations (latin1_swedish_ci,IMPLICIT), (utf8_general_ci,COERCIBLE), (utf8_general_ci,COERCIBLE) for operation 'replace' –  Mar 02 '16 at 15:28
  • Then you need to convert your db character set from swedish_ci to utf8. Follow Orions instructions from above. `ALTER DATABASE db CHARACTER SET utf8 COLLATE utf8_general_ci;` and `ALTER TABLE table CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;` – awinwood Mar 09 '16 at 00:10